From 79a8c6bac3efa2a36c75a5a16d92aa10baf89c0a Mon Sep 17 00:00:00 2001 From: Steve Mao Date: Fri, 25 Dec 2015 16:39:41 +1100 Subject: [PATCH] feat(init): extracting code from https://github.com/ajoslin/conventional-changelog --- .gitignore | 2 + .jscsrc | 5 +++ .jshintrc | 15 +++++++ .travis.yml | 13 ++++++ convention.md | 89 ++++++++++++++++++++++++++++++++++++++++++ index.js | 87 +++++++++++++++++++++++++++++++++++++++++ package.json | 43 ++++++++++++++++++++ readme.md | 16 ++++++++ templates/commit.hbs | 5 +++ templates/footer.hbs | 11 ++++++ templates/header.hbs | 2 + templates/template.hbs | 16 ++++++++ test.js | 83 +++++++++++++++++++++++++++++++++++++++ 13 files changed, 387 insertions(+) create mode 100644 .gitignore create mode 100644 .jscsrc create mode 100644 .jshintrc create mode 100644 .travis.yml create mode 100644 convention.md create mode 100644 index.js create mode 100644 package.json create mode 100644 readme.md create mode 100644 templates/commit.hbs create mode 100644 templates/footer.hbs create mode 100644 templates/header.hbs create mode 100644 templates/template.hbs create mode 100644 test.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6cb772b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +tmp diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..703fb35 --- /dev/null +++ b/.jscsrc @@ -0,0 +1,5 @@ +{ + "preset": "google", + "maximumLineLength": null, + "excludeFiles": ["node_modules/**"] +} diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..2cb788b --- /dev/null +++ b/.jshintrc @@ -0,0 +1,15 @@ +{ + "boss": true, + "curly": true, + "eqeqeq": true, + "eqnull": true, + "immed": true, + "latedef": true, + "mocha" : true, + "newcap": true, + "noarg": true, + "node": true, + "sub": true, + "undef": true, + "unused": true +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..eb7c40d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +language: node_js +node_js: + - '5' + - '4' + - '3' + - '2' + - '1' + - '0.12' + - '0.10' +before_script: + - git config --global user.name 'Travis-CI' + - git config --global user.email 'dummy@example.org' +after_script: NODE_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage diff --git a/convention.md b/convention.md new file mode 100644 index 0000000..9fb4338 --- /dev/null +++ b/convention.md @@ -0,0 +1,89 @@ +#### Examples + +Appears under "Features" header, pencil subheader: + +``` +feat(pencil): add 'graphiteWidth' option +``` + +Appears under "Bug Fixes" header, graphite subheader, with a link to issue #28: + +``` +fix(graphite): stop graphite breaking when width < 0.1 + +Closes #28 +``` + +Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: + +``` +perf(pencil): remove graphiteWidth option + +BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reason. +``` + +The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. + +``` +revert: feat(pencil): add 'graphiteWidth' option + +This reverts commit 667ecc1654a317a13331b17617d973392f415f02. +``` + +### Commit Message Format + +A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: + +``` +(): + + + +