@sbpro/ng
v3.1.0
Published
Start Bootstrap Pro Angular Schematics
Downloads
1,968
Maintainers
Readme
Getting Started With Schematics
This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.
Commands
ng generate @sbpro/ng:module --path src/modules --name test --dry-run
ng generate @sbpro/ng:module --path src/modules --name test
ng generate @sbpro/ng:component --path src/modules/test/components --name test
ng generate @sbpro/ng:directive --path src/modules/test/directives --name test
ng generate @sbpro/ng:service --path src/modules/test/services --name test
ng generate @sbpro/ng:node-crud --path src/app/routes --name some-entity --internal
ng generate @sbpro/ng:stack-node-entity-routes --path src/features/admin/routes --name test
ng generate @sbpro/ng:stack-node-entity-routes --path src/features/admin/routes --name test --org
ng generate @sbpro/ng:stack-node-feature --path src/features --name test
ng generate @sbpro/ng:stack-node-route --path src/features/greeting/routes --feature greeting --name test
Templatizer
node node_modules/.bin/templatizer --path src/app/routes/org/products -n product
Development
# In sbpro-schematics
npm link
# In dependant project root
npm link @sbpro/ng
Publishing
npm config get scope
npm config set scope sbpro
Build
npm run build
Versioning
# npm version [patch|minor|major]
# npm version patch 1.0.0 -> 1.0.1
# npm version minor 1.0.0 -> 1.1.0
# npm version major 1.0.0 -> 2.0.0
npm version
# check package.json
cat package.json | grep version
Push to git
export NPM_NEW_VERSION=$(node -e "var pj=require('./package.json'); console.log(\`v\${pj.version}\`)");
echo "Pushing $NPM_NEW_VERSION to github"
git push origin $NPM_NEW_VERSION
Practice Run
cd sbpro-schematics
npm pack
tar -tvf RESULTING_TAR_FILE
# Don't forget to delete it
rm -f *.tgz
Publish
npm install && npm run build && npm publish --access public
Updating projects
npm i -D @sbpro/[email protected]