64 Commits

Author SHA1 Message Date
Alan
beb7070ac8 feat(@schematics/angular): introduce Ivy libraries for development
Since `NGCC` is non incremental and in library projects we have the original TS sources
we don't need to build a library using the `VE` and transform it using `NGCC`. Instead we can build the library using `NGTSC` (Ivy) directly
 as this enables faster incremental compilations and a better development experience.

 Libraries now have a `production` configuration, which enabled `VE` compilations. As it is not recommended to publish NGTSC (Ivy)
 built libraries to NPM repositories, since Ivy libraries are not backwards compatible with the legacy View Engine.
2019-08-16 09:31:02 -07:00
Charles Lyding
5a7b823b28 test: remove use of deprecated synchronous test helper runSchematic 2019-08-08 08:27:31 -07:00
Alan Agius
d7b9650b5f refactor(@schematics/angular): remove hardcoded default values
Defaults in code are no longer required as the root issue was solved by https://github.com/angular/angular-cli/pull/15222
2019-08-08 08:25:50 -07:00
Alan Agius
15ef15e94a style: remove redundant max-line-length disables and fix other lint issues 2019-07-24 19:06:21 -07:00
Wataru.Kasahara
4cbf59beb2 fix(@schematics/angular): add text-summary to code coverage reporter 2019-07-10 04:16:27 +08:00
hawkgs
fdcd1f7546 feat(@schematics/angular): lazy routing module generator
Introduces the lazy routing module generator as part of the existing
module generator.

Feature document:
https://docs.google.com/document/d/1NAJEWTG54cu4kW7XBp0gVadmz-gqJouW2XDs4c9PPJM/edit#heading=h.xgjl2srtytjt
2019-06-26 11:15:58 -07:00
Alan
89a122cd5c fix(@schematics/angular): update ng-packagr and tsickle when migrating to version 8 2019-06-06 14:16:51 -07:00
Charles Lyding
635de55982 fix(@schematics/angular): enable tsickle for library compilation
This is required to support forward references in ES2015 target code.  tsickle provides the constructor parameter downlevel logic that removes the runtime TDZ error that would otherwise be encountered.
2019-05-23 19:12:40 +02:00
Charles Lyding
6b28d3ac51 fix(@schematics/angular): remove emitDecoratorMetadata TS option for new applications 2019-05-23 19:12:40 +02:00
hawkgs
d1332607d6 fix(@schematics/angular): project name option in the library schematic 2019-05-07 16:15:34 -06:00
Alan Agius
a464c001c3 fix(@schematics/angular): fix paths when newProjectRoot is an empty string
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
2019-04-22 16:17:39 -07:00
Alan
f03ff807b4 refactor(@schematics/angular): create relativePathToWorkspaceRoot helper and replace usages 2019-04-19 10:55:02 -07:00
Charles Lyding
ca1ecb027d test(@schematics/angular): ensure application schematic is run async 2019-04-16 11:23:48 -07:00
Alan Agius
58fb593787 feat(@schematics/angular): update several workspace dependencies
With this change we update ng-packagr, jasmine-core and tslint.
2019-04-15 11:09:13 -07:00
Charles Lyding
cbce3d3793 refactor(@schematics/angular): update library to use new workspace rules 2019-04-15 11:02:46 -07:00
Charles Lyding
a0a583adaa fix(@schematics/angular): remove unused core-js dependency from new projects
Required polyfills are now managed directly by the build system.  If additional polyfills are required, packages can be manually added as needed.
2019-04-04 09:28:02 -07:00
Hans Larsen
2ffbdfa86a build: add a validation script for the analytics.md tables
Also added enums to update when changing dimensions.
2019-03-28 13:28:41 -07:00
Hans Larsen
55471770db refactor: use dimensions for some values instead of metrics
This is after a discussion with someone internal. Metrics are good
for sums but not for comparisons and search/filtering.
2019-03-28 13:28:41 -07:00
Alan Agius
e516a817ac feat(@schematics/angular): update to ng-packagr version 5
This changes remove the need for tsickle.
2019-03-27 12:11:38 -07:00
Hans Larsen
2e9dc3d252 docs: add analytics dimensions for schematics flags and internal doc
The analytics.md should be kept up to date with the flags.
2019-03-20 15:08:07 -07:00
WilliamKoza
d841b3771e fix(@schematics/angular): change entry file name of the library schematic according to the kebab-case convention 2019-03-11 13:40:02 -07:00
Alan Agius
9e18cf240e fix(@schematics/angular): kebab case prefix causes lint errors in new directives
`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
2019-03-04 09:35:22 -08:00
Charles Lyding
b96e7bf76f fix(@schematics/angular): default newProjectRoot to current directory 2019-02-26 08:39:57 -08:00
Amadou Sall
79aa8d602d fix(@schematics/angular): undefined is used as newProjectRoot when none is set
Fixes #13703
2019-02-20 17:13:50 -08:00
Alan Agius
a139243644 refactor: clean up library tsconfig
These properties are already defined in the root tsconfig
2019-02-14 20:58:59 +08:00
Charles Lyding
91d457af73 refactor(@schematics/angular): remove redundant branchAndMerge rules 2019-02-13 15:21:37 -08:00
Luis Confraria
1f9c84f98c fix(@schematics/angular): set restartOnFileChange to true in karma.conf templates
Fix #13542
2019-02-08 16:12:19 -08:00
Alan Agius
6ae1752891 feat(@schematics/angular): remove annotateForClosureCompiler in libraries tsconfig (#13546)
Users outside of Google don't usually need closure annotations.

We should also follow up with ng-packagr to remove tsickle from peerDependency and afterwards, we be able to remove tsickle from the added dependencies when running this schematic
2019-01-30 11:24:04 -08:00
Alan Agius
6c0b4db7de
fix(@schematics/angular): tsconfig.json can't be parsed if it contains comments
Fixes #13455
Closes #13456
2019-01-18 13:14:54 -08:00
Alan Agius
36eba0c9fc refactor: use .template suffix for all schematic files
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
2019-01-16 10:29:56 -08:00
Amadou Sall
3e14158283 fix(@schematics/angular): generate coverage for libs in their own folder 2019-01-14 10:57:51 -08:00
Klaus Kazlauskas
100cf47cb9 feat(@schematics/angular): generate a library with a README.md file
Fixes #13296
2019-01-08 13:45:18 -08:00
Alan Agius
0715beb65c feat(@schematics/angular): add lintFix to several other schematics
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
2018-12-13 15:53:13 -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
cexbrayat
f7ac352d0a docs: typo in library command docs 2018-11-19 17:20:20 -08:00
Judy Bogart
268ce42933 docs: fix typos 2018-11-16 15:15:29 -08:00
cexbrayat
aeb96a0913 docs: typo in library command docs 2018-11-14 12:45:46 -08:00
Alan Agius
e18b912aa7 test: use toContain instead of indexOf 2018-11-14 12:34:49 -08:00
Judy Bogart
cf75a6401a
docs: clarify library description 2018-11-13 13:09:51 -08:00
Judy Bogart
ed6e765471
docs: add generation schematics option docs 2018-11-13 13:09:51 -08:00
Sibiraj
96be267815 style: fix indentation in tslint.json 2018-10-31 21:01:59 -07:00
Alan Agius
0b4e91bb97 feat(@schematics/angular): enable typescript helpers in workspace 2018-10-23 10:22:16 -07:00
Alan Agius
8bbba9d0ac fix(@schematics/angular): update @angular peerDependencies for new libraries 2018-10-19 15:58:12 -07:00
clydin
e9a8c3cfa8 feat(@schematics/angular): add prompts for all name options (#12519) 2018-10-10 12:11:12 -07:00
Filipe Silva
72ded97a8f fix(@schematics/angular): dasherize library package name
Fix #11017
2018-09-26 08:17:01 -04:00
Christian Liebel
e72d1c3ed7 feat(@schematics/angular): update tsconfig.json libs to include es2018
Update the lib property in tsconfig.json files for Angular libraries and workspaces to include es2018.
2018-09-25 16:38:43 -04:00
Cédric Exbrayat
5757b21f21 fix(@schematics/angular): remove module test (#11278)
The `module` schematic was generating a useless `module.spec.ts` file.
This commit removes such test.

Fixes #11277
2018-09-20 14:05:47 -07:00
Alan Agius
5308fa07d9 feat(@schematics/angular): update ng-packagr to 4.2.0 2018-09-18 11:30:54 -07:00
Hans
f15d5589c3 refactor(@schematics/angular): automated JSON schema generation 2018-09-13 16:44:17 -07:00
Charles Lyding
f107d2de11 fix(@schematics/angular): use 'architect' instead of 'targets' until deprecated 2018-09-13 16:43:31 -07:00