3.1.0 • Published 2 years ago

@sbpro/ng v3.1.0

Weekly downloads
505
License
-
Repository
-
Last release
2 years ago

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/ng@1.6.1
3.1.0

2 years ago

3.0.0

2 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago