612 Commits

Author SHA1 Message Date
Jason Jean
92383e53b6 fix(schematics): add es2015 module to tsconfig 2018-12-03 11:52:01 -05:00
Jason Jean
dd4d671341 fix(schematics): generate defaults for scss 2018-11-23 11:10:10 -05:00
Jason Jean
5357aa4b9c fix(schematics): fix affected argument delimiting 2018-11-19 17:29:25 -05:00
Jason Jean
dfba24dc9b fix(builders): do not copy fixtures if not defined by cypress.json 2018-11-19 17:29:02 -05:00
--get
54063df355 feat(builders): create sourcemaps for node apps 2018-11-18 14:42:57 -05:00
--get
f8ac8e1569 feat(schematics): add generic affected 2018-11-12 14:30:25 -05:00
--get
ed938e4cda feat(builders): allow copying of assets for node apps 2018-11-12 13:51:40 -05:00
ben
f38bda025b feat(schematics): add cypress e2e test runner
This is enables the use of Cypress as e2e test runner for a new
application in the Nx workspace.

The Cypress command is hidden as a flag in the main application
schematics. Meaning, the only thing needed to enable this feature is to
add the `--e2eTestRunner=cypress` flag at your command when creating
a new application.
Example:
```shell
$ ng generate application myApp --e2eTestRunner=cypress
```

By default `ng e2e my-app-e2e` will start Cypress in the application
mode. You will see the desktop application and will be able to check all
the tests and run them as you which.

If you want to run the Cypress tests in headless mode (while being on CI
for example), you can do so by passing the `--headless` to the command.
  You will see all the test results live in the terminal.
  ```shell
  $ ng e2e my-app-e2e --headless
  ```

The Cypress configuration files and folders are present in the new
`my-app-e2e` folder created. Every file are written in typescript and
will be compiled into the `/dist/apps/my-app-e2e` folder before starting
Cypress.

If you need to fine tunes the options of Cypress, you can do so by
modifying directly the `cypress.json` file in the related project.

The build steps are has follow:
• compile typescript files into javascript inside the
`/dist/app/my-app-e2e` folder
• build a dev server (using the default AngularCLI dev target build)
• run Cypress with the compiled e2e files

Screenshots and Videos will be accessible respectively in
`/dist/apps/homer-app-e2e/screenshots` and
`/dist/apps/homer-app-e2e/videos`.
2018-10-25 12:14:35 -04:00
--get
47d99d49ba fix(schematics): fix tslint rules for ngadd 2018-10-24 09:42:49 -04:00
--get
67c4bdf4af feat(schematics): upgrade to angular 7 2018-10-24 09:42:31 -04:00
skydever
cd43c6d9ba fix(schematics): check type of tsConfig lint entry (ng-add) 2018-10-22 11:15:53 -04:00
--get
8c22ae41bb feat(schematics): make jest flow simpler 2018-10-22 11:08:59 -04:00
--get
9a60c697e8 fix(schematics): handle complex asset options in ng-add 2018-10-18 14:01:35 -04:00
Jason Jean
9b8755a327 feat(schematics): add schematics for node apps 2018-10-01 20:31:39 -04:00
--get
c9d3f97b9f feat(schematics): update @angular/cli to 6.2.3 and ngrx 6.1.0 2018-09-28 13:14:45 -04:00
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