47 Commits

Author SHA1 Message Date
Alan Agius
7cd801eb06 fix(@schematics/angular): show better error when non existing project is passed to the component schematic
Closes: #21003
2021-06-02 09:15:17 +02:00
Charles Lyding
37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07:00
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Alan Agius
226a8d274d feat(@schematics/angular): remove tslint and codelyzer from new projects
Both of these projects and the tslint builder are deprecated.

Closes #20105 and closes #18465
2021-03-16 15:49:46 +01:00
Alan Agius
1de6d71edd feat(@schematics/angular): production builds by default
With this change we do several changes to the `angular.json` configuration for `build` , `server` and `app-shell` targets so that these are `production` by default.

- build, server and app-shell targets are configured to run production by default.
- We add a new configuration named `development` to run the mentioned builder targets in development. Ex: `ng build --configuration development`.
- When adding `universal` or `app-shell`, we generate the full set of configurations as per the `buiid` target. Previously, we only generated the `production` configuration.
- We added a helper script in `package.json` to run build in watch mode. `npm run watch` which is a shortcut for `ng build --watch --configuration development`
2021-03-10 08:16:38 -06:00
Alan Agius
0bc15970ad refactor(@schematics/angular): use jsonc-parser instead of devkit parser 2020-11-05 08:31:02 +01:00
Alan Agius
da9825ceb2 refactor(@schematics/angular): use ng-packagr builder from build-angular 2020-08-14 15:38:12 +02:00
Alan Agius
8b96e52d83 fix(@schematics/angular): remove solution style tsconfig from new projects
Following the issues highlighted in https://docs.google.com/document/d/1eB6cGCG_2ircfS5GzpDC9dBgikeYYcMxghVH5sDESHw/edit?usp=sharing and discussions held with the TypeScript team. The best course of action is to rollback this feature.

In future, it is not excluded that solution style tsconfigs are re-introduced..

Closes #18040 and closes #18170
2020-08-12 19:26:12 +01:00
Alan Agius
bede23226a feat(@schematics/angular): add solutions style tsconfig structure
In version 3.9, TypeScript introduced the concept of "Solutions Style" tsconfig to improve developer experience.

More info: https://devblogs.microsoft.com/typescript/announcing-typescript-3-9-rc/#solution-style-tsconfig

Closes #17493 and closes #8138
2020-05-20 12:12:33 -07:00
Daniele Morosinotto
3aacf41057 fix(@schematics/angular): regression tsconfig.json #16708 (#16709)
* fix(@schematics/angular): regression tsconfig.json

fix(@schematics/angular): regression tsconfig.json  …
Unverified
0e318ae
Regression in tsconfig.json set `"outDir": "./dist/out-tsc"` for problems in VSCode TS(2307) when building library referred in tsconfig "paths" 
 
Closes: #16708

* fix(@schematics/angular): regression tsconfig.json

Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's.

Closes #16709

* fix(@schematics/angular): regression tsconfig.json

Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's.
Fix code lint.

Closes #16709

* fix(@schematics/angular): regression tsconfig.json

Improve paths in root tsconfig.json for better DX experience when using auto imports in IDE's.
Fix test code to conform new behaviour.

Closes #16709
2020-01-23 17:58:38 -08:00
Alan Agius
be1bcbaead fix(@schematics/angular): improve paths and exclude options
Currently the library schematic doesn't support adding a secondary entry-point and having deep imports is not recommanded.

It's best if paths are more stricter when having a secondary entry-point instead of a wildcard.

Instead of :
```
"lib/*": [
  "dist/lib/*"
]
```

Users should configure:
```
"lib/secondary": [
  "dist/lib/secondary"
]
```

This would allow a better DX experience when using auto imports in IDE's.

Closes: #15952
2019-12-03 12:37:07 -08:00
Alan Agius
a384a983fa feat(@schematics/angular): add tslib as a peerDependencies in library package.json
This is to align with https://github.com/angular/angular/pull/32167
2019-10-22 13:26:38 -07:00
Alan Agius
745670fa6a feat(@schematics/angular): remove dependency on tsickle (#15603)
With this change we remove the requirement  to add tsickle as a dependency when having a workspace library.

Since the CTOR downlevel transformer which was previously provided via tsickle  is now in ng-packagr version 5.5.1+ We migrate existing libraries to remove the need for tsickle.
2019-09-18 14:50:29 +01:00
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
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
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
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
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
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
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
Charles Lyding
91d457af73 refactor(@schematics/angular): remove redundant branchAndMerge rules 2019-02-13 15:21:37 -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
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
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
Filipe Silva
72ded97a8f fix(@schematics/angular): dasherize library package name
Fix #11017
2018-09-26 08:17:01 -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
Charles Lyding
f107d2de11 fix(@schematics/angular): use 'architect' instead of 'targets' until deprecated 2018-09-13 16:43:31 -07:00
Alan Agius
82f2bda2f5 refactor(@schematics/angular): make interaction with architect targets type safe 2018-09-12 12:37:24 -07:00
Alan Agius
718ee15b9a refactor: remove flatModuleId and flatModuleOutFile from library tsconfig
The autogenerated fiellds are no longer required following this PR https://github.com/dherges/ng-packagr/pull/1024

This has been released in `ng-packagr` `v4.1.0`
2018-08-21 10:16:38 -07:00
Alan Agius
c35b44ca4d feat(@schematics/angular): add skipInstall option to library schematic
Closes: #11343
2018-08-04 12:46:55 +01:00
Alan Agius
50fc7214c4 feat(@schematics/angular): add support for watch when building a library
`ng-packagr` version `4.0.0-rc.3`, lands the incremental builds feature.

More info:  https://github.com/dherges/ng-packagr/blob/master/CHANGELOG.md#400-rc2-2018-06-23

`enableResourceInlining` needs to be enabled for libraries that contain components

Closes: #11100
2018-07-30 06:41:28 -07:00
Alan Agius
10eb83d660 feat(@schematics/angular): update ng-packagr to version 4 2018-07-25 22:54:22 +01:00
Filipe Silva
307160806c feat(@schematics/angular): use targets property on new projects 2018-07-25 20:17:33 +01:00
Mike Brocchi
876105cef1 fix(@schematics/angular): Fix JSON parsing
fixes #10880
2018-06-08 21:44:37 +01:00
Mike Brocchi
d3b49a5590 refactor: Consolidate adding dependencies 2018-06-08 19:59:53 +01:00
Hans Larsen
44086c60ff build: move devkit repo back to angular-cli 2018-06-05 18:50:06 -07:00