486 Commits

Author SHA1 Message Date
Hans Larsen
890cfbe7c7 fix(@angular-devkit/build-angular): fail the build if service worker fails
Its the sensible thing to do.
2019-03-11 13:48:01 -07:00
Hans Larsen
15312e8ef0 feat(@angular-devkit/architect): add targetFromTargetString() function
Useful for reading options. This uses the reverse logic from
targetStringFromTarget().

Also add tests for both functions.
2019-03-11 13:48:01 -07:00
Charles Lyding
9bd93579c7 test(@angular-devkit/build-angular): ensure server address type before use 2019-03-11 13:46:48 -07:00
Charles Lyding
54ad086493 fix(@angular-devkit/build-webpack): check server address type before use 2019-03-11 13:46:48 -07:00
Charles Lyding
1357ea2183 build: update minimum required Node.js version to 10.9 2019-03-11 13:46:48 -07:00
Alan
b32ad328cf fix(@angular-devkit/build-optimizer): don't add pure comments inside arrow functions
Fixes #13768
2019-03-11 13:45:00 -07:00
Alan Agius
1e3c6e3ca5 fix(@angular-devkit/build-angular): fix base href insertion when HTML is in a single line
When HTML is in a single line using offset + 1 will cause the insertion of the base href tag in the wrong possition.

Fixes #13851
2019-03-11 13:43:54 -07:00
Alan
901042d95b fix(@angular-devkit/build-angular): fix check for absolute paths in windows in server config
This changes fixes `Error: You must pass in a NgModule or NgModuleFactory to be bootstrapped`.

At the moment the check for absolute path is not correct for windows.

Fixes #13865 and fixes https://github.com/angular/universal/issues/1139
2019-03-11 13:40:38 -07:00
Hans Larsen
15d7aea2b7 feat(@angular-devkit/core): analytics interfaces and basic implementations
This is a preliminary analytics interface. It is meant to be used by every
other subsystem where useful, but can be replaced by implementations.
2019-03-11 13:38:00 -07:00
Renovate Bot
29b1533fa9 build: update webpack-dev-middleware to version 3.6.1 (#13843) 2019-03-07 16:02:08 -08:00
clydin
b1477425d9 feat(@angular-devkit/schematics): support unicode character HTML element names (#13837)
The HTML specification allows for a wide variety of characters to be present within a custom element name.  The previous behavior limited the names to mostly alphanumeric characters.  This change opens up the names to include the characters specified within the specification for custom element names.
2019-03-07 16:01:41 -08:00
clydin
324d9f2d4f feat(@angular-devkit/schematics): support basic promise/async based rules (#13660)
Currently, all third-party schematic developers are forced to use and directly depend on `rxjs` if any logic is asynchronous.   Doing so can can also add overhead and unneeded complexity for organizations that have chosen to standardize on async/await usage. This change allows such parties to rely on native promise support if desired.
2019-03-07 15:51:03 -08:00
Charles Lyding
a1aa8d56c4 feat(@angular-devkit/core): add workspace reader/writer core API
NOTE: No changes have yet been made to the public API of the package.
This introduces the core and eventual public API for the stable workspace API.  This is not intended to be feature complete but rather represents the initial base infrastucture necessary for pending future feature additions.
2019-03-06 11:34:05 -08:00
Charles Lyding
263231ea56 refactor(@angular-devkit/core): move existing workspace API under experimental
This API is already experimental.  The move allows for the new stable API to use the "workspace" directory structure and to also better signify that the existing API is in fact experimental and subject to change or removal.
2019-03-06 11:34:05 -08:00
Alan
309b4838c3 fix(@angular-devkit/build-angular): don't bundle linked modules when bundleDependencies in none in server builder
Fixes #13817
2019-03-06 11:29:51 -08:00
Filipe Silva
643e83d054 feat(@schematics/angular): use esnext as the default TS module format 2019-03-06 11:29:34 -08:00
Alan Agius
320273af5a feat(@angular-devkit/build-angular): add support for tslint 5.13+
Tslint 5.13+ introduced an addition parameter for the format method, mainly used for check-style formatter.

During runtime users using an older version of tslint that doesn't expose this it is not a problem as this parameter will be ignored.

See: 9000479b69
2019-03-06 11:28:37 -08:00
Alex Eagle
4e262f966f build: Update to latest bazel rules 2019-03-06 11:27:48 -08:00
Hans Larsen
f06493cb8a feat(@angular-devkit/architect): QoL changes for builders
Add a scheduling options to scheduleTarget and Builder on the context so
builders can schedule sub-builds and override the logger.

Add a getTargetOptions() for builders to get access to options from the
host for a specific target. This allows builders to get options, override
some, then scheduleBuilder with those new options, for example.
2019-03-06 10:05:31 -08:00
Hans Larsen
61adf9ae35 refactor(@angular-devkit/build-angular): remove useless variable rename 2019-03-06 10:05:31 -08:00
Hans Larsen
0003adf757 refactor: builders can return non-observable output 2019-03-06 10:05:31 -08:00
Renovate Bot
392f52580d build: update autoprefixer to version 9.4.10 2019-03-05 15:44:54 -08:00
Charles Lyding
28b3042dc5 style: fix lint errors 2019-03-05 14:53:33 -08:00
Hans Larsen
eca5dc322f test(@angular-devkit/build-angular): move ALL Browser Builder tests
To the new Architect API.
2019-03-05 11:14:59 -08:00
Hans Larsen
e8dab635ff feat(@angular-devkit/build-angular): add Browser Builder v2
It exposes a lot of functions that can be reused to run webpack with
different config, so third party builders can reuse those.
2019-03-05 11:14:59 -08:00
Hans Larsen
041907d551 feat(@angular-devkit/core): add factories for workspace
It makes it easier instead of always copy-pasting the same findUp code
to get the workspace file.
2019-03-05 11:14:59 -08:00
Hans Larsen
02943eaf49 fix(@angular-devkit/architect): properly subscribe to error handlers
If an error is reported but ANY subscription have an undefined error handler, RxJS
reports the error to the "host platform" (it setTimeout(() => throw error)). Since
we properly handle errors in some places, but should ignore them in others (e.g.
we handle errors on the outboundBus, so the output subscription should ignore it),
we still need to subscribe to error, just ignore it.
2019-03-05 11:14:59 -08:00
Hans Larsen
f0adbc41fd fix(@angular-devkit/architect): properly report errors thrown by builder
When they are thrown by the builder itself.
2019-03-05 11:14:59 -08:00
Hans Larsen
e6ba05ba64 fix(@angular-devkit/build-webpack): also split on multi modules and spaces
Its not perfect but it will give a better overview of the file and it
is shorter.
2019-03-05 11:14:59 -08:00
Mathias Raacke
dfb08b95b7 feat(@ngtools/webpack): allow .svg files as templates
With directTemplateLoading enabled, components
can now use .svg files as templates. For AOT builds,
the Angular compiler host now reads .svg files
directly when reading component templates.
For JIT builds, replaceResources creates a require call
that directly uses raw-loader instead of using the
loader provided by the current webpack configuration.

Closes #10567
2019-03-05 10:16:41 -08:00
Alan Agius
d1a0697102 test: fix new tslint architect test large on windows 2019-03-04 10:25:32 -08:00
Charles Lyding
2f4602db08 feat(@angular-devkit/build-angular): change es5BrowserSupport output filename to polyfills.es5.js
Closes #13808
2019-03-04 09:36:00 -08:00
Renovate Bot
b80a281342 build: update ajv to version 6.10.0 2019-03-04 09:35:46 -08:00
Renovate Bot
ef523d0d41 build: update webpack to version 4.29.6 2019-03-04 09:34:41 -08:00
Alan
46e898f2ab fix(@angular-devkit/architect-cli): fix paths to support Windows 2019-03-04 09:34:00 -08:00
Hans Larsen
79c546b470 feat(@angular-devkit/build-webpack): add a "build" builder
Having webpack everywhere is redundant. I would like to deprecate the
"webpack" and "webpack-dev-server" in favor of simply "build" and
"dev-server".
2019-02-27 10:11:22 -08:00
Hans Larsen
862571cfd0 test: add tests for build-webpack:webpack-dev-server new builder 2019-02-27 10:11:22 -08:00
Hans Larsen
44900f9d00 test: add tests for build-webpack:webpack new builder 2019-02-27 10:11:22 -08:00
Hans Larsen
06f5624b71 feat(@angular-devkit/build-webpack): add API builder for dev server
It outputs the port and address that it is bound to.
2019-02-27 10:11:22 -08:00
Hans Larsen
318a0a3b99 feat(@angular-devkit/build-webpack): add API builder for webpack
It takes a webpack config path from its options, add the Architect Plugin to it
which reports progress and status to Architect from webpack events.
2019-02-27 10:11:22 -08:00
Hans Larsen
2ffaf0c11c feat(@angular-devkit/architect): allow for a different output type
There is no schema validation of output and we are not planning any
for now, but the attributes should be retained.
2019-02-27 10:11:22 -08:00
Hans Larsen
f1edc089ed refactor: remove build-webpack schema.d.ts and use quicktype 2019-02-27 10:11:22 -08:00
Hans Larsen
03fc0e6bdb feat(@angular-devkit/architect-cli): wait for last output of build
This allows watching builds to work. They wont show logs though. Looking
into making a better UI for this tool.
2019-02-27 10:11:22 -08:00
Hans Larsen
a90ba8eaa5 fix(@angular-devkit/architect-cli): remove any throttling of the progress bar
Sometimes it would miss the last update and it showed up at completed but the bar
would not be at 100%.
2019-02-27 10:11:22 -08:00
Renovate Bot
0be006ce00 build: update autoprefixer to version 9.4.9 2019-02-27 10:11:06 -08:00
Alan Agius
70b28193c9 fix(@angular-devkit/build-angular): sourceMap option not working in tests
Fixes #13766
2019-02-26 08:37:49 -08:00
Renovate Bot
15b208fa95 build: update license-webpack-plugin to version 2.1.1 2019-02-26 08:34:27 -08:00
Renovate Bot
4dfa5036cb build: update terser-webpack-plugin to version 1.2.3 2019-02-26 08:34:16 -08:00
Renovate Bot
f282797197 build: update webpack-dev-server to version 3.2.1 2019-02-26 08:34:04 -08:00
Alan Agius
ae13974f1d build: update to rxjs 6.4 2019-02-26 08:33:48 -08:00