233 Commits

Author SHA1 Message Date
Alan
64b83e2a55 feat(@schematics/angular): relocate ng g service-worker files
This is a follow up on https://github.com/angular/angular-cli/pull/13811, with this now all application have the same structure and hence `ng g service-worker` should follow suit and have the same folder strucute if generated in a root app, or an app inside the projects.
2019-03-06 11:27:04 -08:00
Alan
1fcb9a09f9 test: remove now duplicate test 2019-03-04 10:26:09 -08:00
Alan
08c4cb748f fix(@schematics/angular): reintroduce .sass as a supported file extention
Sass Indented (.sass) is fully supported by the Sass team and we should still offer and support it.

Fixes #13739
2019-03-04 10:26:09 -08: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
Alan Agius
edfc155f35 feat(@schematics/angular): rename tsconfig.e2e.json to tsconfig.json
This will help IDEs as they only pick up the standard name
2019-03-04 09:33:12 -08:00
Alan
026ae8cefc feat(@schematics/angular): change layout of e2e files
With this change E2E files will be relocated inside an existing application instead of creating a seperate E2E project. This will also remove a lot of extra boilerplating inside the workspace configuration file.

File layout:
```
│   browserslist
│   karma.conf.js
│   tsconfig.app.json
│   tsconfig.spec.json
│   tslint.json
│
├───e2e
│   │   protractor.conf.js
│   │   tsconfig.e2e.json
│   │
│   └───src
│           app.e2e-spec.ts
│           app.po.ts
│
└───src
    │   favicon.ico
    │   index.html
    │   main.po.ts
    │   main.ts
    │   polyfills.ts
    │   styles.css
    │   test.ts
    │
    ├───app
    │       app.component.css
    │       app.component.html
    │       app.component.spec.ts
    │       app.component.ts
    │       app.module.ts
    │
    ├───assets
    │       .gitkeep
    │
    └───environments
            environment.prod.ts
            environment.ts
```

Ref: TOOL-699
2019-03-04 09:33:12 -08:00
Hans Larsen
214e8efaa7
release: v8.0.0-beta.4 2019-02-28 17:57:33 -08:00
Alex Eagle
4a093e5e38 Revert "feat(@angular/cli): Add VsCode extension recommendations"
This reverts commit d9166b04fccc708bc3856a6b243a8752120f312d.
2019-02-28 10:25:28 -08:00
Alex Eagle
71428bd9cb Revert "feat(@angular/cli): Add VsCode recommendation for Angular Console"
This reverts commit 3d6ae631788b600a1b80132ae407f15ad3dc65aa.
2019-02-28 10:24:46 -08:00
Alex Eagle
242ebd932f Revert "feat(@schematics/angular): recommend plugins that John Papa recommends"
This reverts commit 3a68b8cf9696e678308da65ca59b53329981c94f.
2019-02-28 10:24:44 -08:00
Minko Gechev
ef11c9fbc9 release: v8.0.0-beta.3 2019-02-27 16:40:55 -08:00
Alex Eagle
3a68b8cf96 feat(@schematics/angular): recommend plugins that John Papa recommends
This list comes from https://marketplace.visualstudio.com/items?itemName=johnpapa.angular-essentials
But we don't write a .prettier.json config file so we don't include the Prettier plugin yet
2019-02-27 10:10:18 -08:00
Filipe Silva
05966646e7 feat(@schematics/angular): rename experimentalIvy to enableIvy
Followup to https://github.com/angular/angular/pull/28569#discussion_r259558085
2019-02-26 10:49:58 -08:00
mrmeku
3d6ae63178 feat(@angular/cli): Add VsCode recommendation for Angular Console 2019-02-26 08:45:12 -08:00
Charles Lyding
b96e7bf76f fix(@schematics/angular): default newProjectRoot to current directory 2019-02-26 08:39:57 -08:00
cexbrayat
58bc5b8f2a fix(@schematics/angular): remove ViewEncapsulation from root component 2019-02-22 15:53:34 -08:00
cexbrayat
61cca4116a fix(@schematics/angular): remove extra comma in component schematic
This was introduced by #13690
2019-02-22 15:53:34 -08:00
Filipe Silva
becd2f53d5 fix(@schematics/angular): use enableIvy as true
Blocked on https://github.com/angular/angular/pull/28616
2019-02-22 15:52:58 -08:00
Keen Yee Liau
ac77a5e9ab fix(@schematics/angular): JsonUtils should respect indent
This commit fixes a few issues with json-utils:

1. The implementation is lacking tests
2. The implementation hardcodes indent = 2 in many places and
   does not respect the `indent` parameter passed by users
3. The implementation is buggy when passed an empty object or array
2019-02-21 15:16:19 -08:00
Keen Yee Liau
a5738dbbf5 release: v8.0.0-beta.2 2019-02-21 10:27:30 -08:00
Alan Agius
9bf8b3e65a fix(@schematics/angular): findModuleFromOptions not handling properly different casing in name
At the moment users can have various casing and seperatirs in paths, we should not always dasherize the name when resolving modules.

As for example when providing something like:

```
/module/SubModule/feature
```

It won't be able to resolve the modules properly as `sub-module` does't exist.

This PR also updates the test for underscore as previously it was not properly testing this usercase, since the formatter was used on name and not th path.

Fixes #13714
2019-02-20 17:14:26 -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
cipchk
1a927aca4d fix(@schematics/angular): fix missing semicolons in extensions.json.template 2019-02-20 10:37:19 -08:00
Charles Lyding
be5e2fbfe5 fix(@angular/cli): remove redundant typescript/compiler-cli compatibility check
Angular 5.0+ has a full peer dependencies setup (with 6.0+ also having a configurable runtime error check) to ensure that an appropriate version of typescript is available for compilation.  Angular CLI 8.0+ does not support Angular versions prior to these and therefore the warning is redundant.  For the case where the developer wishes to use an unsupported TypeScript version, the developer would need to adjust two similar but differently name settings in two different configuration files.
2019-02-20 10:36:52 -08:00
Alan
81acdd7066 fix(@schematics/angular): add file extensions to style prompt
This is causing major confusion as users are not aware that choosing `sass` will generate files with `scss` extension.

Another reason for this confusion is that in other schematics, `style` accepts either a preprocessor or file extension while in this prompt only a preprocessor is provided.
2019-02-19 13:58:32 -08:00
Alan Agius
89797900db fix(@schematics/angular): fixes issue that ViewEncapsulation is not being configured when provided
Fixes #13689
2019-02-19 13:57:05 -08:00
Keen Yee Liau
040dcb8365 feat(@schematics/angular): Update rxjs to 6.4.0
6.4.0 is needed so that Bazel does not have to build rxjs from source

See [angular/angular#28720](https://github.com/angular/angular/pull/28720)
2019-02-17 10:38:52 -08:00
mrmeku
d9166b04fc feat(@angular/cli): Add VsCode extension recommendations 2019-02-14 09:32:09 -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
WilliamKoza
02410e4633 fix(@schematics/angular): respect the flag when we create a guard with schematics 2019-02-13 15:27:34 -08:00
Charles Lyding
91d457af73 refactor(@schematics/angular): remove redundant branchAndMerge rules 2019-02-13 15:21:37 -08:00
Alex Eagle
6fc6e84b0a fix(@schematics/angular): Include bazel-out in .gitignore
We could do this only when we know the user has opted into using Bazel, like in the @angular/bazel schematics.
However, the complexity of amending new lines to the .gitignore isn't worth it, when we can just add one line here.

Fixes #13636
2019-02-08 16:13:00 -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
cexbrayat
2848964707 fix(@schematics/angular): e2e test fails strict TS config
If using `strictFunctionTypes: true` in `tsconfig.json`, the default e2e test is failing compilation with:

```
error TS2345: Argument of type 'ObjectContaining<{ level: Level; }>' is not assignable to parameter of type 'Expected<Entry>'.
  Type 'ObjectContaining<{ level: Level; }>' is not assignable to type 'ObjectContaining<Entry>'.
    Type 'Partial<{ level: Level; }>' is not assignable to type 'Partial<Entry>'.
     Type '{ level: Level; }' is not assignable to type 'Entry'.
```

Explictely using `as logging.Entry` fixes the issue.
2019-02-08 16:07:50 -08:00
Alan
a7c811a2d9 feat(@schematics/angular): scaffold new projects with angular packages version 8 2019-02-08 16:06:37 -08:00
cexbrayat
6f816cac70 fix(@schematics/angular): update latest version of devkit 2019-02-08 16:05:16 -08:00
Alan Agius
bf566c7101 build: update karma and jasmine dependencies (#13566)
* feat(@schematics/angular): update karma and jasmine dependencies

* feat(@angular-devkit/build-angular): update karma and jasmine dependencies

* build: update karma and jasmine dependencies

* test: add test expectations in shell component
2019-02-05 21:15:08 -08:00
Andrey Chalkin
95dee5a649 fix(@schematics/angular): update typescript to 3.2.4 (#13554)
Fixed inconsistency in typescript versions, all other pkgs have pinned ts 3.2.4
2019-02-05 21:13:26 -08:00
Alan Agius
86356a747d fix(@schematics/angular): set cortrect file extention in config when using preprocessors (#13552)
Fixes #13550
2019-02-05 21:13:03 -08:00
Logan Mzz
8a6e497687 fix(@schematics/angular): use baseUrl for default e2e test
replace usage of `'/'` for default end-to-end test by `browser.baseUrl`
to take into account any accesspath and rely on provided setting.
2019-01-30 11:39:44 -08:00
Alan Agius
d832c8791d fix(@schematics/angular): remove leading comments when removing core-js/es7/reflect (#13528)
Fixes #13491
2019-01-30 11:38:11 -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
f6c80be867 fix(@schematics/angular): add non deprecated style as default
When adding default in the application schematics we should use the non deprecated `style` option.
2019-01-22 09:42:51 -08:00
Judy Bogart
1a3ba03a59 docs: add long description to app-shell subcommand 2019-01-19 12:26:52 -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
Judy Bogart
3a4396580e docs: description of minimal option consistent across commands 2019-01-18 12:06:59 -08:00
Judy Bogart
be3fa89dc3 docs: highlight creating workspace without initial app 2019-01-18 12:06:59 -08:00
Alan
4718de4dae feat(@schematics/angular): only support known style extentions
Fixes #13149
2019-01-18 11:56:19 -08:00
cexbrayat
b1b365e4fd fix(@schematics/angular): update latest version of devkit 2019-01-18 11:55:14 -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