This change allows `inlineTemplate=false` and/or `inlineStyle=false` to be used with the `minimal` option when creating an application either by `ng new` or `ng generate application`.
Closes#17528
Following feedback from the community, which showed a high number of users found it hard to work with the `no-any` lint rule and also the `sideEffects` package.json file. With DevRel we decided to remove both features when generating a strict workspace and/or application.
BREAKING CHANGE:
Deprecated support for IE 9-10 has been removed in Angular 11.
Only IE 9-10 support has been removed. IE 11 is officially supported in Angular 11.
Additional information can be found here: https://v10.angular.io/guide/deprecations#ie-9-10-and-mobile
The schematics recently siwtcher to `jsonc-parser` as the JSOn parser, and that introduced a small regression in the tslint.json file where the rules order is not the same as previously.
See https://github.com/cexbrayat/angular-cli-diff/compare/10.0.2...10.1.0-next.0
This commit should fix the issue by providing the insertion index when merging the tslint files.
A test has also been added to avoid further regressions.
Since the tsconfig for e2e’s is named tsconfig.json there is no reason why it should be included in the solutions typescript configuration file.
Closes#18190
With this change we enable stricter type checking and optimization effective coding rules when using the `--strict` option.
Changes in schematics
- `ng-new`: A prompt for the `--strict` option was added. This option is a proxy and will be passed to the application and workspace schematics.
- `application`: A `package.json` was added in the `app` folder, to tell the bundlers whether the application is free from side-effect code. When `strict` is `true`. the `sideEffects` will be set `false`.
- `workspace` When `strict` is true, we add stricter TypeScript and Angular type-checking options.
Note: AIO is already using these strict TypeScript compiler settings. PR to enable `strictTemplates` https://github.com/angular/angular/pull/36391
Reference: TOOL-1366
By default, we now generate new applications which support only evergreen browsers, as a result differential loading is now opt-in.
A new flag `--legacy-browsers`, was added to generate applications which support non evergreen browsers such as Internet Explorer 11.
**Note**: After an application is generated opting in and out of differential loading is still possible through the supported browsers configuration in the browserslist configuration file defaulted to `.browserslistrc`.
With this change we remove the enableIvy option as now we only support generating Ivy application. Users who want to create a VE applications should follow the opt-out guide
* test: update tests to work with new stricter tsconfig file inclusions
* fix(@schematics/angular): exclusively list the files in tsconfigs
With the omission of `includes` or `files` in tsconfig files tsc will pick up all the files under the rootDir and make them as part of the compilation. In certain cases, redundant files will be picked up which will cause a slower compilations.
Related to: TOOL-949
Testing on AIO with Angular master as of 28/05/2019 I got these results:
JIT ~414ms (369, 378, 408, 323, 593)
AOT using VE ~1383ms (1365, 1185, 1767, 1135, 1467)
AOT using Ivy ~517ms (600, 391, 444, 756, 394)
This is largely due to https://github.com/angular/angular/pull/29380 and https://github.com/angular/angular/pull/30238.
The second PR above was not merged to master, and thus will not be in 8.0.0. This PR should be merged to match it.
When `newProjectRoot` the paths are prefixed with an `/` example `/project-name/tsconfig.lib.json` which results in these being marked as absolute paths, which causes build failures.
Fixes#14108
At the moment when using minimal flag, test targets are being created even though they cannot be used as test setup files are not created nor are testing dependencies
`Component` selectors are always kekabed while `Directive` selectors are always camelized. This updates the lint rules to convert the prefix to the appropiate case
Fixes#13796
Usage:
```
ng new foo --experimentalIvy
```
Users will need to use `ngcc` so to process code coming from NPM and produce the equivalent Ivy version. This needs to be done once after installing the node packages.
```
node_modules/.bin/ivy-ngcc
```
`ngtsc` compilter will then be used when building using the `--aot` or `--prod` flag.
Fixes#13024
This aligns options that do the same thing:
1) `skipSpecs` and `spec` has been deprecated in favor of `skipTests`.
2) `styleext` has been deprecated in favor of `style` since the latest is two words.
Fixes#12784
* fix(@schematics/angular): --minimal should prevent generating e2e
Don't run the e2e schematic when using application or ng-new schematics
with option.minimal set to true.
fix#12739
* style: inverse logic according to feedback
* test(@schematics/angular): app and ng-new --minimal shouldn't generate e2e
This should clean up the code a bit.
Note: at first I added the no-useless-cast rule, but after getting frustrated
with it (as it has many false positive), I decided to remove the rule but some
useless casts were removed so I let those in the PR.