Before contributing, please take time to review our code of conduct here.
$ git clone https://github.com/ebenh/ngx-mat-tel-input/ ${PROJECT_ROOT}
$ cd ${PROJECT_ROOT}
$ npm install
cd ${PROJECT_ROOT}
npx ng build
Note: Add--watch
to enable automatic incremental builds. The build artifacts will be stored in thedist/
directory.
In order for live reload and breakpoints to work with the Angular library, you need replace the following segment
in tsconfig.json
:
"paths": {
"ngx-mat-tel-input": [
"dist/ngx-mat-tel-input/ngx-mat-tel-input",
"dist/ngx-mat-tel-input"
]
}
with this:
"paths": {
"ngx-mat-tel-input": [
"projects/ngx-mat-tel-input/src/public-api.ts"
]
}
$ cd ${PROJECT_ROOT}
$ npx ng serve
$ cd ${PROJECT_ROOT}
$ npm run package-for-npm
$ cd dist/ngx-mat-tel-input/
$ npm pack
From your target project execute the command below. The value of ${VERSION}
should be the library's current semantic version (e.g. 1.0.0
).
$ npm install ${PROJECT_ROOT}/dist/ngx-mat-tel-input/ngx-mat-tel-input-${VERSION}.tgz
Note: Before performing these steps
git stash
any changes you do not want to commit.
$ cd ${PROJECT_ROOT}/projects/ngx-mat-tel-input/
$ VERSION=$(npm version [major|minor|patch])
$ git commit -am "Bumping version number" && git push
$ git tag ${VERSION} && git push --tags
$ cd ../..
$ npm run package-for-npm
$ cd dist/ngx-mat-tel-input/
$ npm adduser
$ npm publish
$ cd ${PROJECT_ROOT}
$ npx ng test
$ cd ${PROJECT_ROOT}
$ npx ng e2e
To run arbitrary Angular CLI commands, prepend calls to ng
with npx
. For example:
$ cd ${PROJECT_ROOT}
$ npx ng generate component component-name
Note: Add
--project ngx-mat-tel-input-test
if you wish to generate a component for the test application.
More information on Angular libraries here.