155 Commits

Author SHA1 Message Date
Alan Agius
42962571be fix(@angular-devkit/build-angular): output non human readable lint result
At the moment, when the tslint formatted is non human readable, it is being fully silenced.

This changes this behaviour and only emit the formatted result.

Fixes #13173
2018-12-12 11:13:08 -08:00
Pascal Honegger
63a9bd464f docs: remove space for webpack-bundle-analyzer url 2018-12-10 13:41:12 -08:00
cexbrayat
4567aa1de4 style(@angular-devkit/build-angular): typo in stylesSourceMap 2018-12-10 13:39:25 -08:00
Alan Agius
51f4e075db test: remove debounce as it's causing flakes 2018-12-06 11:46:58 -08:00
Alan Agius
43231d9507 refactor: script webpack plugin remove webpack 3 code 2018-12-06 11:44:55 -08:00
Alan Agius
18ff08dfb3 refactor: remove webpack 3 code from cleancss plugin 2018-12-06 11:44:42 -08:00
Alan Agius
eaad125da9 refactor: normalizeFileReplacements and normalizeAssetPatterns no longer use rxjs 2018-12-06 11:44:27 -08:00
Alan Agius
af67b49342 refactor: clean up how to generate normalized build options and improve type safety 2018-12-06 11:44:27 -08:00
Alan Agius
4f8a5b7a55 feat(@angular-devkit/build-angular): fine grain settings for optimization 2018-12-06 11:44:27 -08:00
Alan Agius
45b6df511f fix(@angular-devkit/build-angular): lint non human readable formatters produces invalid output
fixes #12674
2018-12-06 11:24:27 -08:00
Alan Agius
8bc6e79d89 fix(@ngtools/webpack): files are not being updated when using allowJs or resolveJsonModule (#13089)
* fix(@ngtools/webpack): files are not being updated when using `allowJs` or `resolveJsonModule`

Fixes #13076 and Fixes #12964

* test: add tests for allowJs and resolveJsonModule in watch mode

* test: improve tests for `allowJs`

When not using `allowJs` js files are not processed by the tsc compiler, but still processed by webpack.

So a correct test should be to check that the JS is transpiled down to ES5 syntax.
2018-11-30 14:10:18 -08:00
Alan Agius
0692cacd06 feat(@schematics/angular): account for root level assets and resourcesOutputPath (#13074)
* feat(@schematics/angular): account for root level assets and `resourcesOutputPath`

By default we are only account for assets inside the assets folder. Which breaks the offline experience.

Fixes #13067

* test: add test to verify root level assets in service workers
2018-11-30 14:08:03 -08:00
Alan Agius
cd66d27170 refactor: deprecate evalSourceMap (#13063)
Missed a couple in https://github.com/angular/angular-cli/pull/12966
2018-11-30 14:06:55 -08:00
Alan Agius
8516d68213 feat(@angular-devkit/build-angular): fine grain settings for sourceMaps (#13062)
* feat(@angular/cli): update schema to match new `sourceMap`

* feat(@angular-devkit/build-angular): fine grain settings for sourceMaps

This PR add more control over which sourceMaps you want, Now you can enable sourceMaps for scripts only, styles only or both. Also we added another functionality which are hidden sourcemaps. These are normaly used for error reporting tools.

Fixes #7527
2018-11-30 13:11:52 -08:00
Alan Agius
508d4df482 choreUpdate angular and tsickle dependencies (#13034)
* build: update `@angular/packages` to `7.1.0`

* feat(@schematics/angular): use tsickle `>=0.34.0` when creating a library

This is the official version that supports 3.1+

* feat(@schematics/angular): use angular version `7.1.0`
2018-11-27 14:02:23 -08:00
Charles Lyding
bd55bf01d5 refactor(@angular-devkit/build-angular): enable direct template loading 2018-11-18 10:41:47 -08:00
Alan Agius
282eb52e08 refactor: use buildOptions directly 2018-11-15 17:09:43 -08:00
Alan Agius
a38566f18e feat(@angular-devkit/build-angular): add option to allow outputting css resources to a different folder
Added `resourcesOutputPath` option so that CSS assets such as images and fonts are outputted to a subfolder in `dist`
2018-11-15 17:09:43 -08:00
Charles Lyding
c631c1852f test: update angular test dependencies 2018-11-15 17:07:59 -08:00
Alan Agius
67630f5270 fix(@angular-devkit/build-angular): remove skipAppShell as it has no effect in browser builder
Closes #11478
2018-11-15 17:07:25 -08:00
Alan Agius
3c875a1148 refactor: deprecate evalSourceMap
This was previously done for build performance, however this is no needed anymore
2018-11-15 17:06:27 -08:00
Alan Agius
1dbd574714 fix(@ngtools/webpack): Fix lazy loading (#12945)
* revert: fix(@ngtools/webpack): output consistent filename

This reverts commit df172bdc8af4caa1a908592a8b9400d31c81eeb0.

* refactor(@ngtools/webpack): remove RegExp for ngfactory

This RegExp is not needed as if it actually works it will break lazy loading as in case of AOT, the name should always be suffixed with ngfactory

4c2ce4e8ba/packages/core/src/linker/system_js_ng_module_factory_loader.ts (L83)
2018-11-14 12:41:27 -08:00
Cédric Exbrayat
3c8b33ab3a fix(@angular-devkit/build-angular): add a base href to karma context (#12889)
This commits adds a base href value in the karma context iframe used to run unit tests.

It solves a very old issue in Angular https://github.com/angular/angular/issues/12295 where a unit test throws:

    No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.

even if the application is fine. This is because the `index.html` from Angular CLI contains a base href value, but not the Karma context iframe. So when adding a unit test with a testing module that imports a NgModule, for example `AppModule`, which itself imports `RouterModule`, the unit test used to throw an error (regression appeared in router 3.1).

That could be solved by either adding `RouterTestingModule` to the testing module, or by adding a provider `{ provide: APP_BASE_HREF, useValue: '/' }`, but required to understand the issue (see how many thumbs up there are on the original issue).

This solves the issue in a transparent way: developers won't even encounter the problem anymore.
2018-11-08 10:34:35 -08:00
Alan Agius
3f85824ecf feat(@angular-devkit/build-angular): update autoprefixer (#12785) 2018-11-08 10:32:48 -08:00
fscherwi
8d69589733 feat(@angular-devkit/build-angular): update node-sass (#12890) 2018-11-08 10:29:28 -08:00
Filipe Silva
4fd7310332 feat(@angular-devkit/build-angular): improve verbose output (#12833) 2018-11-06 22:44:39 -08:00
Alan Agius
aaa453e3f5 feat(@angular-devkit/build-angular): update webpack (#12801) 2018-11-06 22:44:25 -08:00
Filipe Silva
0909943259 test(@angular-devkit/build-angular): test karma on watch mode 2018-11-01 10:31:50 -07:00
Filipe Silva
e4c0151241 test(@angular-devkit/build-angular): remove unneeded flag from test 2018-11-01 10:31:50 -07:00
Filipe Silva
cd0b01a2f9 feat(@angular-devkit/build-angular): stop karma gracefully
Followup to https://github.com/karma-runner/karma/pull/3153
2018-11-01 10:31:50 -07:00
Alan Agius
33781e1c19 docs: update descriptions for builders 2018-10-31 21:04:55 -07:00
Teamop
ef6d76e4a9 fix(@angular-devkit/build-angular): improve bundle size value displaying 2018-10-31 21:00:08 -07:00
Charles Lyding
9ae9757048 feat(@angular-devkit/build-angular): update webpack dependencies
Webpack@4.22.0
2018-10-23 12:08:31 -07:00
Charles Lyding
9f114aee1e refactor(@angular-devkit/build-angular): cleanup/fix linting of webpack configs 2018-10-23 12:07:09 -07:00
Jeffrey Bosch
d3395bed76 fix(@angular-devkit/build-angular): update license-webpack-plugin
Closes #12649
2018-10-23 12:01:25 -07:00
Alan Agius
22dc791d96 fix(@angular-devkit/build-angular): error when using protocol-relative url
Fixes #12648
2018-10-23 11:58:29 -07:00
Andrey Sitnik
e897b39afc feat(@angular-devkit/build-angular): update Autoprefixer and PostCSS
Closes #9861 and Closes #9829
2018-10-23 11:50:09 -07:00
Alan Agius
f61ea6b69f fix(@ngtools/webpack): report a warning when lazy route discovery is disabled
At the moment this will cause a runtime error instead. With this change a warning will be shown during the build.

Closes #12238 and Closes #12025
2018-10-23 11:47:55 -07:00
Alan Agius
9d69367e97 fix(@angular-devkit/build-angular): update copy-webpack-plugin dependency
This fixes the issue that newly added files are not copied on serve

Fixes #9669
2018-10-23 11:47:15 -07:00
Alan Agius
7f0a7ce5df feat(@angular-devkit/build-angular): expose buildWebpackConfig method in KarmaBuilder
Closes #12447
2018-10-23 10:16:12 -07:00
Alan Agius
edb84b340f fix(@ngtools/webpack): emit lazy routes errors on rebuilds (#12418)
* fix(@ngtools/webpack): emit lazy routes errors on rebuilds

At the moment lazy route errors are only emitted in the initial builds because in following builds we are only processed lazy routes that are declared in the changed files.

At the moment, we cannot cache the previously resolved routes as there is no way to track in which file the lazy route was declared so that we can bust the lazy route if it was removed.

Closes #12236

* test: add test for compilation errors in watch mode

Closes #12311
2018-10-23 10:15:35 -07:00
Filipe Silva
a6ffa2b9ab fix(@angular-devkit/build-angular): update copy-webpack-plugin 2018-10-19 14:57:04 -07:00
Hsuan Lee
387d64c317 fix(@angular-devkit/build-webpack): skip transition property optimization
jakubpawlowicz/clean-css#1050 to be fixed before removing this option.

Fix #12408
2018-10-18 07:17:40 -07:00
Alan Agius
8b400f2f74 docs: improve command option descriptions 2018-10-18 07:10:59 -07:00
Alan Agius
df172bdc8a fix(@ngtools/webpack): output consistent filename
At the moment when having namedChunks file names are different between JIT and AOT builds .

AOT will will output something like
```
customers-customers-module-ngfactory.9b8b989df2e32e5cadac.js
```
while JIT will output

```
customers-customers-module.js
```

This PR aligns the output file name
2018-10-15 14:32:47 -07:00
Filipe Silva
431df79a1b fix(@angular-devkit/build-angular): dont serve files on cwd (#12547) 2018-10-10 12:12:08 -07:00
Filipe Silva
916a616762 fix(@angular-devkit/build-angular): fix extractLicenses default (#12546)
It should be false so that it doesn't affect dev builds. The default production config has it set to true already.

Partially address #12432.
2018-10-10 12:11:46 -07:00
Alan Agius
150dd4755b fix(@schematics/angular): codeCoverage exclude is not being migrated (#12511)
Fixes #10936
2018-10-10 12:09:32 -07:00
Filipe Silva
023a67254e fix(@angular-devkit/build-angular): don't override missing options in protractor (#12507)
Fix #10697
2018-10-10 12:09:02 -07:00
clydin
2bdf99bad3 test: cleanup poll CLI E2E test (#12497)
* test: cleanup poll CLI E2E test

* test(@angular-devkit/build-angular): adjust poll test
2018-10-10 12:07:13 -07:00