StarterKit Setup

Create your development folder (skip if you already have one)

$ mkdir ~/dev/spark && cd $_

Initialize nx workspace

$ npx create-nx-workspace

Choose the following options from the prompts

$ npx create-nx-workspace

 NX   Let's create a new workspace [<https://nx.dev/getting-started/intro>]

✔ Where would you like to create your workspace? · spark-starter-kit
✔ Which stack do you want to use? · none
✔ Package-based monorepo, integrated monorepo, or standalone project? · integrated
✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · skip

Open workspace in VSCode

$ code spark-starter-kit

Generate an Angular application

# Execute in the newly created project root. eg. ~/dev/spark/spark-starter-kit

# Add @nx/angular dependency
$ npx nx add @nx/angular

# Generate an angular application
$ npx nx g @nx/angular:application \\
    --name=webapp \\
    --bundler=esbuild \\
    --directory=apps/webapp \\
    --addTailwind=true \\
    --minimal=true \\
    --prefix=spark \\
    --style=scss \\
    --no-interactive

More: https://nx.dev/nx-api/angular/generators/application

Now, you can serve your application using https://nx.dev/nx-api/nx/documents/run

$ npx nx run webapp:serve

You should be able to see your application at http://localhost:4200/

Generate an Angular library

$ npx nx g @nx/angular:library \\
		--name=ui \\
		--buildable=true \\
		--directory=libs/webapp/ui \\
		--addTailwind=true \\
		--changeDetection=OnPush \\
		--prefix=spark \\
		--projectNameAndRootFormat=as-provided \\
		--skipModule=true \\
		--style=scss \\
		--no-interactive

More: https://nx.dev/nx-api/angular/generators/library