ng-module-template-test v5.0.2
ng-module-template
A template for building Angular applications or re-usable Angular modules that you can publish to npm. This template is compatible with Angular 5.
Install
git clone https://github.com/angular-patterns/ng-module-template.git
cd ng-module-template
npm install
Development
Opens webpack-dev-server on port 8080 for development:
npm run dev
Building a Reusable Angular Module
npm run build-module
Production distribution files may be found in the dist folder.
Test
There are five type of tests:
- Unit Tests -
npm run test - e2e Tests -
npm run e2e - lint Tests -
npm run lint - Code Metrics -
npm run metrics - Size Report -
npm run build
All reports are stored under the reports folder.
Production Builds
You have two options for a production build:
Angular Application - outputs to the
distfolder.npm run buildReusable Angular Module - outputs to the
distfolder.npm run build-module
Naming your application or module:
npm run name-module -- --name <my-module>
npm add *
`npm commit -m "renamed module"
Deployment
There are two options for deployment.
Publish to local file system
npm run publish-local- publishes from thedistfolder toc:\packages.The folder can be customized using a
destparameter:npm run publish -- --dest c:\path\to\my-modulePublish to npm
npm publishFollow the publish instructions from npm: https://docs.npmjs.com/getting-started/publishing-npm-packages
Installing your Published Module
If you published locally:
npm install c:\path\to\my-module --save
If you published to npm:
npm install my-module --save