Make `replaceAppNameWithPath` uses pattern matching while replacing the strings, making sure it does
not mess with the wrong properties or values. Example: `ui` was messing with `build` &&
`@angular-devkit/build-angular`.
fix#856
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`.
This adds a log in the terminal while performing the build, to update the user on the last
destination of the Nx libraries. Contrary to the last log from ng-packagr saying that the build is
in `/dist`, it is moved right after in the `/buil`. To avoid the confusion, this log say the right
information.
DataPersistence methods have been refactored to use pipeable operators, but these operators weren't
exported so they could not be used outside of the library. Now, users will be able to import the
operators themselves.
This adds the `<%= className%>PartialState` used to type the store from the
`DataPersistence` methods.
This adds the `XXX_FEATURE_KEY` to the `xxx.reducer.ts` file too.
close#748