From c887d77446a53d083ae4b201376c07f96e4e55e5 Mon Sep 17 00:00:00 2001 From: Fabrizio Fortunato Date: Mon, 19 Jun 2017 21:46:30 +0100 Subject: [PATCH] Added support for commitizen --- README.md | 11 +++++++++++ generators/app/templates/_package.json | 11 +++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f4b9c77..be3423f 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,17 @@ This will generate a `dist` directory with: - `*.d.ts`: type definitions for you library - `sample-library.metadata.json`: metadata for your library to support AOT compilation +## Commit changes + +You can run + +```bash +$ npm run commit +``` + +This will use (https://github.com/commitizen/cz-cli)[commitizen] using +the `cz-conventional-changelog` for your commit message + ## Generating documentation for your library From the root of your library directory, run: diff --git a/generators/app/templates/_package.json b/generators/app/templates/_package.json index c67bb6b..bc49586 100644 --- a/generators/app/templates/_package.json +++ b/generators/app/templates/_package.json @@ -9,7 +9,8 @@ "docs:serve": "npm run docs:build -- -s", "docs:watch": "npm run docs:build -- -s -w", "lint": "tslint --type-check --project tsconfig.json src/**/*.ts", - "test": "tsc && karma start" + "test": "tsc && karma start", + "commit": "git-cz" }, "repository": { "type": "git", @@ -59,7 +60,13 @@ "ts-node": "~2.0.0", "tslint": "~4.5.0", "typescript": "~2.2.0", - "zone.js": "^0.8.4" + "zone.js": "^0.8.4", + "commitizen": "^2.9.6" + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } }, "engines": { "node": ">=6.0.0"