Angular schematics for Nimble components in Angular

Usage no npm install needed!

<script type="module">
  import niNimbleAngularSchematics from 'https://cdn.skypack.dev/@ni/nimble-angular-schematics';


ni | nimble | angular schematics

Nimble Angular Schematics

NPM Version

This repository is a simple schematic implementation for the nimble-angular repository.

It contains a template that extends the standard ng generate component template to include a Storybook file (*.stories.ts), and to modify the generated module file (*.module.ts) to explicitly export the component.

How to use this project

To generate a new nimble-* component in the nimble-angular repository:

  1. npm i -D @ni/nimble-angular-schematics at the root of NimbleAngular (should already be complete)

  2. Navigate to the components directory. I.e. cd projects/nimble-angular/src/components/

  3. Run ng generate module and enter the component name when prompted. E.g. nimble-button

  4. Run ng g @ni/nimble-angular-schematics:nimble and enter the same name. E.g. nimble-button

  5. Navigate back to the root directory and run Storybook to see the live component. Modify the component for your specific needs. E.g.

cd ../../../../
npm run nimble:watch:storybook

Example component screenshot


Follow the instructions in CONTRIBUTING.md to modify this library.