1347 Commits

Author SHA1 Message Date
Jason Jean
d6ff7244c7 feat(schematics): allow generation of app with jest unit testing (#764)
This PR requires https://github.com/nrwl/nx/pull/758

## Current Behavior

The option to generate an application with a unit-test-runner of jest is not available

## Expected Behavior

User is able to generate an application which uses jest to run unit tests via:
```sh
ng g jest
ng g app jest-app --unit-test-runner jest
ng test jest-app
```
2018-09-14 11:59:49 -04:00
Jason Jean
5a547ccadd feat(schematics): add schematics for jest 2018-08-29 11:44:39 -04:00
Jason Jean
b5550d367c fix(schematics): set versions consistent with cli 6.1.2 2018-08-04 08:37:43 -04:00
Thomas Burleson
8334c200a7 fix(schematics): library schematic properly removes extra files
Angular CLI now supports `host.delete()`. `updateProject()` now properly removes
the library generated service and component files.

>  Earlier workarounds using `unlink()` were not working.

Refs #650.
2018-08-03 17:01:19 -04:00
Jason Jean
205e7ad7ef feat(schematics): support @angular/cli@6.1.1 2018-08-02 13:39:19 -04:00
Thomas Burleson
57d6b0bd93 feat(ngrx): add support for NgRx Facade classes
Add support to generate NgRx facade classes when the command `--facade` boolean option
is used.

```console
ng g ngrx <feature> --facade
```

> Note this will not generate facades for existing ngrx features; this option
is currently only available for *new* ngrx scaffolding.

* Add code generators for `<feature>.facade.ts` + `<feature>.facade.spec.ts`

Fixes #629. Fixes #638.

use entity
2018-07-29 13:42:44 -04:00
Thomas Burleson
aa1b7766c5 fix(ngrx): fix lint issues in schematic templates
The ngrx schematic templates have some minor lint errors that manfiest in new ngrx generated code.

*  In the ngrx e2e tests, add check for tsLint errors in the generated code
*  Fix lint issues for the upgrade-module and associated tests.
2018-07-29 11:30:04 -04:00
swseverance
e1984fa40e fix(schematics): update devDependencies (#637)
* Move @ngrx/store-devtools and ngrx-store-freeze' to devDependencies
2018-07-22 12:30:31 -05:00
Thomas Burleson
04e99b06ae fix(schematics): ngrx schematics should generate enhanced ngrx files
@nrwl/schematics no longer uses the @ngrx/schematics to generate NgRx feature files.
*  `ngrx/files/__directory__` templates are used
*  Templates replicate the simple outputs generated from @ngrx/schematics:feature
*  Templates add significant Nx enhancements.

The following standard files will be scaffolded:
* `<feature>.actions.ts`
* `<feature>.effects.ts` + `<feature>.effects.spec.ts`
* `<feature>.reducer.ts` + `<feature>.reducer.spec.ts`

The following new files will also be scaffolded:
* `<feature>.selectors.ts` +  `<feature>.selectors.spec.ts`

Changes include:

* Change the action/enums to generate a trio of enums for each *feature*: `Load<Feature>`, `<Feature>Loaded`, and `<Feature>LoadError`
* Add code generators for `<feature>.selectors.ts`
* Add code generators for unit and integration testing `*.spec.ts` files
* Update the public barrel [`index.ts`] when adding ngrx to a library
* Use `StoreModule.forFeature()` when adding ngrx feature (without using the `--root` option)
* Use the Effect to respond tp `load<Feature>$` and dispatch `<Feature>Loaded` or `<Feature>LoadError`
* Update the Action to export `<feature>Actions` map of all action classes
* fix `ng-add.test.ts` tests for latest Angular CLI scaffolding
* fix `application.spec.ts` expect fails

Fixes #472,  Fixes #618,  Fixes #317,  Fixes #561, Refs #380.
2018-07-21 21:13:48 -04:00
Jonathan Cammisuli
4916c7ce88 test(schematics): update ng-add e2e tests to check for new 'affected:libs' property 2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
ee1eb2cf82 style(schematics): change e2e it descriptions to previous name 2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
72e3eed599 style(schematics): format command-line.test.ts 2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
ea15cf2a94 test(schematics): add e2e tests for building publishable libs 2018-07-09 11:27:47 -04:00
Jason Jean
0ad61c7acb feat(schematics): deprecate nx update 2018-06-14 12:02:29 -04:00
Jason Jean
577c72ba78 feat(schematics): allow isolation of failed affected commands 2018-06-13 17:13:32 -04:00
Victor Savkin
f80061d37d feat(schematics): add --all to all affected:* commands 2018-06-11 12:12:11 -04:00
Victor Savkin
f99210a5e2 fix(schematics): update create-nx-workspace to use the latest stable version of the @nrwl/bazel package 2018-06-11 10:32:59 -04:00
Victor Savkin
f00ff2c7d2 feat(schematics): add nx.json to the default list of implicit deps 2018-06-11 10:26:08 -04:00
Jason Jean
caa5274fad feat(schematics) add migration for implicitDependencies 2018-06-09 12:54:33 -04:00
Victor Savkin
55b7386b99 fix(schematics): remove fit 2018-06-07 20:55:21 -04:00
Jason Jean
1ec9af56fd fix(schematics): add rxjs-compat during ng-add 2018-06-02 18:23:06 -04:00
Jason Jean
dd0a93251a fix(schematics): allow projects without e2e configurations and report more useful errors during add and update 2018-06-02 18:22:51 -04:00
Victor Savkin
aeb0d8eb83 feat(schematics): add lint:affected 2018-05-31 16:53:28 -04:00
Victor Savkin
40671bfc9b chore: disable broken test 2018-05-31 16:53:07 -04:00
Jason Jean
dd04b95b96 fix(schematics) add NxModule during ng add 2018-05-31 15:43:32 -04:00
Jason Jean
7af36a4f3c feat(schematics) support adding nx to platform-server workspaces 2018-05-30 20:30:00 -04:00
Jason Jean
2c1bda7ce1 fix(schematics) fix package json inconsistencies when using ng add 2018-05-29 09:45:51 -04:00
Victor Savkin
3a2d27ac20 fix(schematics): fix tests 2018-05-13 20:12:59 -04:00
Victor Savkin
b77ad0e479 fix(schematics): fix e2e tests 2018-05-13 20:12:59 -04:00
Victor Savkin
23cb4ae5d4 fix(build): removes fit 2018-05-11 10:45:52 -04:00
Jason Jean
39eb6d38e7 feat(schematics): working v6 ng add 2018-05-09 09:24:06 -04:00
Victor Savkin
af0c7acc4f feat(schematics): change upgrade-module and downgrade-module schematics to work with CLI6 2018-05-08 12:35:42 -04:00
--get
7c330163bd feat(schematics): add exclude option for affected 2018-05-08 10:30:39 -04:00
--get
9a1e6c0849 fix(schematics): filter nx specific flags from being passed to ng cli 2018-05-08 10:30:39 -04:00
Victor Savkin
fd5149d762 feat(schematics): add affected:test 2018-05-07 10:30:55 -04:00
Victor Savkin
907ec27528 feat(schematics): switch to cli6 2018-05-06 19:12:02 -04:00
mrmeku
08896fd195 feat(schematics): Generate --help for every CLI function.
This PR introduces the yargs package as our CLI command handler.
We build up commands using yargs to take advantage of its built
in --help flag formatter.
2018-04-12 21:49:59 -04:00
Nitin Vericherla
49525efe3e feat(nx): support to generate visualization graph
`npm run dep-graph` outputs a visual dependency graph
2018-04-06 20:51:02 -04:00
Victor Savkin
bc559575f5 feat(schematics): add support for workspace-specific schematics 2018-04-05 15:44:15 -04:00
FrozenPandaz
5a26f241b1 feat(schematics): add ability to create bazel workspace 2018-04-02 19:32:29 -04:00
Thomas Burleson
4edc8e6c8b feat(schematics): use @ngrx/schematics
* ngrx collection now extends @ngrx/schematics
* modify the nrwl `ngrx` schematic to use `@ngrx/schematics` to generate the initial source for actions, reducers, and effects
* modify the generated source to conform to Nx standards
* generate init and interface files
* remove template files for action, effect, and reducer scaffolding
* modify collection to extend `@ngrx/schematics` so the ngrx commands are also easily accessible
* inject dataloaded enums into action class
* configure nx workspace devDep on @ngrx/schematics version
* override ngrx effects.spec.ts with nx templated version

fixes #174.
2018-03-30 19:47:29 -04:00
Victor Savkin
2acf28c50d fixes build 2018-03-30 19:20:35 -04:00
Victor Savkin
ce553b732e feat(schematics): add lint checks ensuring the integrity of the workspace 2018-03-29 13:26:40 -04:00
FrozenPandaz
fea4f48dec fix(schematics): update karma conf with app check 2018-03-29 13:08:00 -04:00
Victor Savkin
4e9d52a044 simplify build setup to use the main tsconfig.json file for tests 2018-03-28 11:21:52 -04:00
FrozenPandaz
edac12c859 refactor: add rule for no unused locals and cleanup 2018-03-27 19:46:56 -04:00
FrozenPandaz
9cc8259190 refactor(schematics): add method for updating and reading json 2018-03-27 10:48:12 -04:00
vsavkin
9a40686bcc formatting 2018-03-25 15:43:17 -04:00
Thomas Skalnik
7b63de662e feat(schematics): use npm-run-all to run build in parallel 2018-03-25 14:13:43 -04:00
FrozenPandaz
fc0bec9080 fix(schematics): fix e2e lint config in angular cli json 2018-03-25 10:56:36 -04:00