0.0.0 • Published 1 year ago

angular-nx-storybook-monorepo v0.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Angular Nx Storybook Monorepo

What is Nx?

The Nx Monorepo Manager is a build and development tool for managing monorepos. A monorepo is a software development strategy where multiple projects or libraries are stored within a single repository. Nx provides a set of powerful features to help developers streamline their work in this environment, including:

  1. Code sharing and reuse: Nx enables developers to easily share and reuse code across multiple projects within the monorepo.
  2. Dependency management: Nx understands the dependencies between projects, allowing for efficient incremental builds and testing.
  3. Consistent tooling: Nx provides a consistent set of tools and configurations for all projects, ensuring that the entire monorepo follows best practices and remains maintainable over time.
  4. Extensible plugin system: Nx supports a wide range of plugins for popular frameworks and libraries, making it easy to add new capabilities to the monorepo.

Installing Nx

To install Nx, run:

npm install -g nx

Creating a new workspace

To create a new Angular Nx workspace, run:

npx create-nx-workspace@latest

Creating a new Angular application

To create a new Angular application, run:

nx g @nrwl/angular:application portal

Creating a new Angular library

To create a new Angular library, run:

nx g @nrwl/angular:library components

Creating a TypeScript library

To create a new TypeScript library, run:

nx g @nrwl/workspace:lib commons

Running Angular portal application

To run the Angular portal application, run:

nx serve portal

Running Angular portal tests

To run the Angular portal tests, run:

nx test portal

Running Angular portal e2e tests

To run the Angular portal e2e tests, run:

nx e2e portal-e2e

Generate Storybook Configuration for Angular~

To generate Storybook configuration for Angular, run:

nx g @nrwl/angular:storybook-configuration components

Nx General

This workspace has been generated by Nx, a Smart, fast and extensible build system.

Development server

Run nx serve portal for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Understand this workspace

Run nx graph to see a diagram of the dependencies of the projects.

Remote caching

Run npx nx connect-to-nx-cloud to enable remote caching and make CI faster.

Further help

Visit the Nx Documentation to learn more.