Show Menu
Cheatography

CCW Nx Workspace Cheat Sheet by

List of handy Nx commands for CSSA-CCW UI workspace

Generate new Vue component

nx g @nx-plus/vue:component <name> --project=admin --directory=components --style=scss

Run nx command on single or multiple projects

nx run-many --target=lint --projects=admin --fix
nx run-many --target=format --projects=public --fix
nx run-many --target=stylelint --projects=shared-ui. --ix
Caution while running on all projects

List of nx commands for all uncomm­itted changes

nx format:write --uncommitted
nx affected --target=lint  --uncommitted
nx affected --target=stylelint --uncommitted

Run test for effected projects on uncommited files

nx affected:test --uncommitted

Test a project

nx test <name>

Lint a project

nx lint <name>

Format a project

nx format <name>
--write or --check options accepted

Help

nx help
 

Run lint-stage on staged files

npx lint-staged
Manually trigger mandatory checks for pre-commit

Serve applic­ations

nx serve public
nx serve admin

Build applic­ations

nx build admin --prod
nx build public --prod
--prod option is required to production build

Serve storybook

nx storybook core-public
nx storybook core-admin
nx storybook shared-ui

Build storybook

nx storybook core-public
nx storybook core-admin
nx storybook shared-ui

Report version

nx report

Dependency Graph

nx graph
 

Generate new Vue app

nx g @nx-plus/vue:app <name>

Generate new Vue library

nx g @nx-plus/vue:lib <name>

Adding Vuex to app

nx g @nx-plus/vue:vuex <project>

Generate migration

nx migrate @nx-plus/vue
nx migrate @nx-plus/vue@version # you can also specify version
This will generate changes but will not install

Run migration

nx migrate --run-migrations=migrations.json
This will run the actual migration
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.