-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add schematics #2032
feat: add schematics #2032
Conversation
…gxs#1827) * test(store): fix jest config - update ignored patterns - [x] exclude template files with 'spec' in file name when executing unit tests; * fix(store): update excluded patterns in eslintignore - [x] exclude template files from eslint check; * fix(tslint): update tslint excludes - [x] exclude template files form tslint check;
…ts (ngxs#1838) * feat(ngadd): improve the ngxs ng-add schema and factory, add unit test - [x] update the lib.config - add more available ngxs plugins; - [x] ng-add schema - add selectable packages, add optional application project name; - [x] ng-add factory - add selectable ngxs packages if they are not present yet; - [x] ng-add factory - import the ngxs module in the root app module if project name is provided; - [x] implement a basic ng-add factory unit test; - [x] add the missing angular-devkit/schematics-cli package; - [x] add the package commands to run existing ngxs schematics; * Update packages/store/schematics/factories/ng-add/ng-add.factory.spec.ts - [x] add comments matching preferred test style; Co-authored-by: Mark Whitfeld <[email protected]> * Update packages/store/schematics/factories/ng-add/ng-add.factory.spec.ts - [x] add comments matching preferred test style; - [x] tweak module import to be more typically formatted; Co-authored-by: Mark Whitfeld <[email protected]> * Update packages/store/schematics/factories/ng-add/ng-add.factory.ts - [x] fix typos; Co-authored-by: Mark Whitfeld <[email protected]> * Update packages/store/schematics/factories/ng-add/ng-add.factory.ts - [x] format tweaks, so that prettier has less work to do; Co-authored-by: Mark Whitfeld <[email protected]> * refactor(schematics): add a shared library configuration options object Co-authored-by: Mark Whitfeld <[email protected]>
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 0b0994e. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 3 targetsSent with 💌 from NxCloud. |
BundleMonFiles updated (1)
Unchanged files (2)
Total files change +340B +0.32% Groups updated (3)
Final result: ✅ View report in BundleMon website ➡️ |
BundleMon (NGXS Plugins)Files removed (2)
Files updated (7)
Unchanged files (7)
Total files change -259B -0.44% Groups updated (3)
Final result: ❌ View report in BundleMon website ➡️ |
BundleMon (Integration Projects)Unchanged files (1)
No change in files bundle size Final result: ✅ View report in BundleMon website ➡️ |
ffa184b
to
a76a75f
Compare
a76a75f
to
d8a7450
Compare
} | ||
|
||
Object.values(LIBRARIES) | ||
.filter(lib => options.packages?.includes(lib)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the packages
option is reflected in the CLI, I was wondering if renaming it to plugins
will be more consistent with this https://www.ngxs.io/plugins
53e6be6
to
14ef098
Compare
Code Climate has analyzed commit 0b0994e and detected 9 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 88.8% (50% is the threshold). This pull request will bring the total coverage in the repository to 95.4% (-0.5% change). View more on Code Climate. |
This PR is based on progress made in the following branches:
https://github.com/ngxs/store/tree/feature/schematics-2023
https://github.com/ngxs/store/tree/feature/schematics-migration
Currently, available targets:
actions
: adds an action as fileng-add
: setups NGXS store with option to:starter-kit
: creates actions and state to an existing projectstate
: create a state file with a selectorstore
: similar to above but with action handler and an action file