Angular Schematics with a Sweet Mustard flavour.
Install our schematics globally with npm install -g @sweet-mustard/schematics
.
To generate a new project with the Sweet Mustard guidelines already in place, run ng new name --collection=@sweet-mustard/schematics --moduleName=${nameModule}
. The moduleName flag is for defining your first module next to the app-module.
Now you have several commands at your disposal to generate new parts of your application:
- Module (default with routing and sandbox):
ng g module ${name}
orng g swm ${name}
- Sandbox:
ng g sandbox ${name}
orng g sws ${name}
- Container:
ng g container ${name}
orng g swc ${name}
Begin by cloning this repo, go to the root-folder and run npm install
.
After that, you are ready to contribute.
- Build your schematic local:
npm run build
- Link your local build:
npm install -g sweet-mustard-schematics-${version}.tgz
- Build a new project (see step 1 of 'how to use') and/or link the schematics to your demo project:
npm link @sweet-mustard/schematics