The format command now splits all the array containing all the urls and patterns given, in smaller chunks arrays, executing the command on each chunks. This prevent to have too long argument on the command for the terminal, which can lead to error on specific OS. The chaining of command is transparent for the user.
close#511
When running the affected command with the `--parallel` option, `npm-run-all` is used to achieve the parallel execution of the desired tasks. Because of the use of `npm-run-all`, the `ng` command should be visible and declared as script command in the `package.json` of your project.
This adds a verification before runing the command with the `--parallel` option to make sure the `package.json` has the `ng: "ng"` command in the `scripts` section.
close#700
This adds a hook to the git command to run prettier on the staged files, before committing. Prettier
has now more broad and general rules with excluded folder and more files to correct.
This adds the ability to automate the format of the commit by prompting the information needed in sequence.
It is then easier to follow the standard format of the repository.
A commit check has been added to the CI too.
Currently the `dry-run` command speed is on an average of:
* `ng g app app_name --dry-run`: 7099.051ms to 7207.579ms;
* `ng g lib lib_name --dry-run`: 4015.622ms to 3881.893ms;
This is due to too many files in the tree. While performing the transformation required
by the schematic, the tree inclues files in the _node_modules, .git, .idea, .vscode_ folders.
These files are not needed and impact the performance of the commandline.
This add a filter function on the tree, before anything is moved. With that filter function
the average speed is:
* `ng g app app_name --dry-run`: 1420.826ms to 1435.487ms;
* `ng g lib lib_name --dry-run`: 1382.279ms to 1413.042ms;
close#706
When injecting a store reference, the store state should be an inline type
based on the feature key that was registered with `StoreModule.forFeature(...)`.
Consider the facade generated for feature 'cars':
```ts
StoreModule.forFeature('cars', carsReducer, { initialState: carsInitialState })
```
```ts
@Injectable()
export class CarsFacade {
constructor( private store: Store<{cars: CarsState}> ) { }
}
```
implicitDependencies between files and projects are already able to be
specified in nx.json, so this adds the ability to specify implicitDependencies
between one project and (multiple) others.
By extension, this also enables a more flexible e2e suite naming
convention than was previously supported.
Closes#665
This adds the support to generate an application with the `inline-template` flag activated.
Two new utils added: `getDecoratorPropertyValueNode` & `replaceNodeValue`.
Add some tests ensure to test the two ways of generating template, using `templateUrls` and `inlineTemplate`.
Tests are unising the flag `inlineTemplate`.
close#519
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.
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
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.
@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.
Currently, DataPersistence methods such as `fetch` and
`optimisticUpdate` take a string as their first argument,
which they use to filter incoming action types. This can
lead to inflexibility in certain cases, such as when
you want to filter the action stream before it gets to
the DataPersistence handler, or when you want to handle
multiple action types with the same effect (as suggested
by Mike Ryan in his "Good Action Hygiene with NgRx talk:
https://www.youtube.com/watch?v=JmnsEvoy-gY)
This PR refactors `optimisticUpdate`, `pessimisticUpdate`,
`fetch` and `navigation` into pipeable operators, and
implements the existing DataPersistence methods in terms
of these operators. This allows users to continue using
instance methods and strings, but enables more advanced
cases where more control over the action and state streams
is needed.