74 Commits

Author SHA1 Message Date
Alan Agius
936a9512ae refactor(@angular-devkit/build-angular): move around i18n methods to make them re-usable 2019-10-25 09:52:56 -07:00
Charles Lyding
276032c962 fix(@angular-devkit/build-angular): use project root as translation file base 2019-10-24 12:04:42 -07:00
Charles Lyding
294ecdd7f3 fix(@angular-devkit/build-angular): remove @angular/localize from application if localizing 2019-10-24 12:04:42 -07:00
Charles Lyding
30536881f9 fix(@angular-devkit/build-angular): set locale identifier when localizing 2019-10-24 12:04:13 -07:00
Charles Lyding
5597f7fedc refactor(@angular-devkit/build-angular): allow control of cache location
`NG_BUILD_CACHE` can specify an absolute path to be used as the cache location.  Caching can also be disabled by setting the variable to 0 or false.
2019-10-23 09:56:49 -07:00
Charles Lyding
358bc12856 feat(@angular-devkit/build-angular): support i18n localization for non-differential builds 2019-10-21 13:03:32 -07:00
Charles Lyding
e9279bbe1a fix(@angular-devkit/build-angular): update sourcemaps during localization 2019-10-21 13:03:32 -07:00
Charles Lyding
895fa620a2 feat(@angular-devkit/build-angular): support deprecated i18n options with new configuration 2019-10-21 13:03:32 -07:00
Charles Lyding
bc831e8ff5 feat(@angular-devkit/build-angular): support parallel i18n localization 2019-10-21 13:03:32 -07:00
Charles Lyding
cda57ae0e5 feat(@angular-devkit/build-angular): optimize i18n localize usage in source locale 2019-10-17 10:45:01 -07:00
Charles Lyding
2b41cd1e81 feat(@angular-devkit/build-angular): initial support for i18n translation inlining 2019-10-17 10:45:01 -07:00
Alan Agius
38947d8643 refactor(@angular-devkit/build-angular): remove differential loading version 1.0 2019-10-15 11:22:34 -07:00
Alan Agius
b3086ffd54 fix(@angular-devkit/build-angular): only copy assets outside of webpack when differential loading is needed in build builder
Fixes #15825
2019-10-14 13:42:29 -07:00
Charles
2dc885304b refactor(@angular-devkit/build-angular): reorganize bundle processing for browser builder (#15776) 2019-10-09 11:25:23 -07:00
Charles
3a44611483 refactor(@angular-devkit/build-angular): initial copy-on-write asset processing support (#15788)
This is currently only supported when performing a differential loading build (no watch mode).  This will eventually be expanded to cover watch mode and non-differential loading builds.
2019-10-09 11:07:31 -07:00
Charles Lyding
72d1bf3c52 refactor(@angular-devkit/build-angular): support reading i18n project options 2019-10-03 14:40:31 -07:00
Charles Lyding
1cefbc6974 refactor(@angular-devkit/build-angular): process bundle code quality improvements 2019-10-03 14:40:31 -07:00
TinyMan
c5869f57bc feat(@angular-devkit/build-angular): set document locale when using i18nLocale
Fixes #8102
2019-10-02 10:55:15 -07:00
Charles Lyding
190f80cf58 refactor(@angular-devkit/build-angular): optimize bundle process cache detection
This causes the cache checking to stop on the first miss since all required entries must be present for a bundle to be considered cached.
2019-09-27 14:41:08 -07:00
Charles Lyding
dd2a6947ff refactor(@angular-devkit/build-angular): improve performance of parallel bundle processing 2019-09-27 14:41:08 -07:00
Charles Lyding
d3e4dfa0c0 fix(@angular-devkit/build-angular): display accurate sizes for downlevelled files
Fixes #15425
2019-09-26 10:00:35 -07:00
Charles Lyding
8dd67cd3cb fix(@angular-devkit/build-angular): inject correct SRI values in downlevel bundles
Fixes #15468
2019-09-26 10:00:35 -07:00
Charles Lyding
d73a098900 refactor(@angular-devkit/build-angular): account for disabled mangling in downlevel cache 2019-09-26 10:00:35 -07:00
Charles Lyding
ffd153a6a2 refactor(@angular-devkit/build-angular): use project metadata in builders
This eliminates the need to manually read a workspace file and removes the use of the experimental workspace API from the package.
2019-09-24 13:18:33 -07:00
Alan Agius
ab5b1909d6 build: update rxjs to 6.5.3 2019-09-24 13:18:09 -07:00
Charles Lyding
8a4bc54ef3 fix(@angular-devkit/build-angular): workaround Node.js copyFile defect on macOS
Fixes #15544
2019-09-19 14:42:04 -07:00
Alan Agius
5e1b3785f6 fix(@angular-devkit/build-angular): fix permission errors for ES5 bundles
copyFilesSync will also copy permissions which may result in permissions errors.

Closes #15490
2019-09-05 00:27:39 +05:30
Charles
4986577f8a fix(@angular-devkit/build-angular): skip downlevel processing of assets (#15433)
* fix(@angular-devkit/build-angular): identify asset emitted files

* fix(@angular-devkit/build-angular): skip downlevel processing of assets

Fixes #15423
2019-08-26 11:50:20 -07:00
Charles Lyding
d1488e66a4 refactor(@angular-devkit/build-angular): cache downlevel bundles 2019-08-20 11:07:55 -07:00
Charles Lyding
1c6f665c4f feat(@angular-devkit/build-angular): implement bundle level downleveling to support differential loading 2019-08-08 08:26:15 -07:00
Alan Agius
4f8e349033 fix(@angular-devkit/build-angular): only add module script types to actual module scripts
Fixes #15102
2019-07-24 19:04:31 -07:00
Charles Lyding
8e97df3888 feat(@angular-devkit/build-angular): allow control of index output path
This allows the output path of an application's index HTML file to be controlled independently of the input file.  The output path for the file will be considered relative to the application's configured output path.  This allows an application to contain multiple input index files for different configurations and allow the output file to remain constant.  This also enables the placement of the index file in a subdirectory within the output path or change the name of the output index file neither of which was previously possible.
2019-07-10 04:34:20 +08:00
Alan Agius
8754ecbf99 fix(@angular-devkit/build-angular): IE11 errors when using scripts and differential loading
Invert the builds so that es2015 scripts output don't override the es5 version.

Fixes #14777
2019-07-02 10:58:36 -07:00
Alan Agius
68227565ce feat(@angular-devkit/build-angular): add crossorigin options
This options allows to define the crossorigin attribute setting of elements that provide CORS support

Closes #14743
2019-06-27 15:12:43 -07:00
Alan
44a0d0fb4e fix(@angular-devkit/build-angular): add type="module" on script tags when differential loading will be enabled
Fixes #14747
2019-06-26 11:17:21 -07:00
Hans Larsen
a5afd7b2b6 fix(@angular-devkit/build-angular): force event category to be something
If it is empty (or undefined), the Universal Analytics package will not send events.
2019-06-25 13:25:23 -07:00
Alan
c7135fae35 fix(@angular-devkit/build-angular): browser builder should not swollow error messages
Closes #14813
2019-06-19 17:07:27 -07:00
Charles Lyding
0ed8de1e8a refactor(@angular-devkit/build-angular): cleanup compatible Angular version check 2019-06-19 17:06:28 -07:00
Alan
be210778f4 fix(@angular-devkit/build-angular): emit warning when using extract-i18n in Ivy
i18n is not yet implemented in Ivy, we should emit a warning stating this and exit gracefully.

This also swaps the readTsConfig logic to use `@angular/compiler-cli` instead of `typescript`. This is needed because when parsing the tsconfig, typescript is not aware of `angularCompilerOptions` and will not merged them if they are at un upper level tsconfig file when using `extends`.

Closes #14225
2019-06-14 12:56:33 -07:00
Alan Agius
1dd399c4d2 fix(@angular-devkit/build-angular): nomodule polyfill for Safari
10.1 and iOS Safari 10.3

The nomodule polyfill needs to be loaded prior to any script and be
outside of webpack compilation because otherwise webpack will cause the
script to be wrapped in `window["webpackJsonp"]` which causes it to
fail.

This polyfill will only be injected when the either Safari 10.1 or iOS
Safari 10.3 support is required, which is based on the browsers  defined in browserslist file.

Fixes #14680
2019-06-11 09:55:03 -07:00
Alan
b361a97abe fix(@angular-devkit/build-angular): absolute outputPath outputs index.html in wrong location
Fixes #14474
2019-05-21 09:07:58 -04:00
Alan
e333450dc0 feat(@angular-devkit/build-angular): add a post transformation hook to index generation
Fixes #14392
2019-05-14 10:51:56 -07:00
Filipe Silva
a41c185713 fix(@angular-devkit/build-angular): relax typescript peerDep
We only use it for a few things but have a strict peerdep.

This strictness causes errors when updating the CLI from 7.x to 8.x projects:
```
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.2", would install "3.4.5").
```
`build-angular` did not have a peerdep in 7.x so this never was a problem.

This PR relaxes the peerdep to `">=3.1 < 3.5"`, which covers the 3.1 used in initial CLI 7.0 projects.
2019-05-07 16:16:46 -06:00
Charles Lyding
b7a26fa08b fix(@angular-devkit/build-angular): add Angular version check into required builders 2019-04-25 10:23:25 -07:00
Filipe Silva
adf46c2bd5 fix(@angular-devkit/build-angular): pass system path to readTsconfig 2019-04-24 06:32:01 -10:00
Minko Gechev
36be8cd42e feat(@angular-devkit/build-angular): warn when target greater es2015
When using differential loading with targets ES5 and ES2016+, the
browser with ESM support will pick `script[type="module"]` scripts even
without supporting ES2016+ syntax.

We want to warn users in this case.
2019-04-22 11:32:48 -07:00
ManfredSteyer
201856a5ec fix(@angular-devkit/build-angular): run build steps for differential loading in sequence to avoid confusing progress information
Before, the build tasks ran in parallel and so the different webpack
instances competed over the same lines on the console.

To fail fast and to prevent to show the same errors twice, the second
build step is not executed if the first one fails.

As running these tasks in sequence causes issues with watch mode, this
PR also disables differential loading when watch mode is requested.
2019-04-19 10:54:51 -07:00
Charles Lyding
f1f49325f7 refactor(@angular-devkit/build-angular): standardize builder transforms 2019-04-15 11:32:02 -07:00
Alan Agius
a29bf4ec36 feat(@angular-devkit/build-angular): enable differential loading for es2015 builds
With this change we turn on differential loading for projects that has es2015 as script target and still want to support browsers which that don't support ES2015.

Supported browsers are defined in the browserlist file.
2019-04-15 11:03:09 -07:00
Alan Agius
efccea6e1a feat(@angular-devkit/build-angular): wire up index generation for differential loading
This change wires up the index generation for multiple bundles, we however don't  enable differential loading for users just yet. As this will be done in a separate PR to change over specs to conform with the new files
2019-04-13 10:52:45 -07:00