Before this commit:
`--minimal=true` create project without any testing frameworks and disable e2e, lint, test targets.
But, if in this minimal project we try command `ng generate class|component|directive|guard|module|pipe|service`, it will always create `*_spec.ts` files.
After this commit:
`--minimal=true` override `@schematics/angular` in `angular.json` to not create `*_spec.ts` files when using `ng generate *` commands.
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
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
Currently when using `ivy-ngcc` it will print out a warning
```
Failed to read entry point info from //node_modules/@schematics/angular/workspace/files/package.json with error SyntaxError: Unexpected token < in JSON at position 1121.
```
Fixes#13378
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
At the moment some schematics contain this options for instance the `guard`, `component` etc.. But some others don't such as `module`
Fixes#12894 and Fixes#6272
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
When creating an application, the project root was always "projects/e2e". This
is undesired as it leads to conflicts when creating another app.
Fix#12491.