Skip to content

Instantly share code, notes, and snippets.

@serjmac
Last active December 10, 2022 18:13
Show Gist options
  • Save serjmac/168e99e73574d55ba0655693c2989ea5 to your computer and use it in GitHub Desktop.
Save serjmac/168e99e73574d55ba0655693c2989ea5 to your computer and use it in GitHub Desktop.
Nx Angular 14 Apps with angular-architects/ddd plugin project creation

Nx Angular 14 Apps with angular-architects/ddd plugin project creation from scratch

nvm install 16

nvm list

nvm use 16.18.1

ng not installed globally? install it:

npm i -g @angular/cli@14

ng version

will output versions, ie angular CLI 14.2.10

npx create-nx-workspace@14

will ask confirmation to install (at the time: create-nx-workspace@14.8.6), press enter and continue:

set workspace name, then what to create in the new workspace: "apps", "no cloud support"... cd to project folder and install dependencies:

npm i @nrwl/angular@14

at this point we don't have .eslintrc.json, so that "angular-architects/ddd:init" would fail, so from Nx Console extension generators or from terminal, create an application, setting name, styles (will be placed under src/apps):

npx nx generate @nrwl/angular:application app-name --style=scss --no-interactive

at this point we have root .eslintrc.json and just created app .eslintrc.json, now we can install angular architects ddd plugin and init:

npm i @angular-architects/ddd@3.0.0

will install appropiate ddd generators plugin for nx 14, not sure if version 2.1.0 is good too for angular 14: "npm i @angular-architects/ddd@2.1.0"

npx nx generate @angular-architects/ddd:init will output "found .eslintrc.json UPDATE .eslintrc.json" with no errors

// TODO Add Ngrx support...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment