Skip to content

Commit 7ab2559

Browse files
feat: add inquirer as dependency
also upgraded commitizen to the latest. BREAKING CHANGE: please reinstall the latest 2.9.5 commitizen globally via npm -i commitizen. Deprecated configuration option has been removed. ISSUES CLOSED: #34
1 parent 1d10e2c commit 7ab2559

3 files changed

Lines changed: 6 additions & 18 deletions

File tree

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Suitable for large teams working with multiple projects with their own commit sc
1313

1414

1515
## Steps:
16-
* install commitizen in case you don't have it: `npm install -g commitizen`. Make sure you have version `2.8.1`+.
16+
* install commitizen in case you don't have it: `npm install -g commitizen`. Make sure you have the latest version of commitizen installed globally.
1717
* install the cz-customizable: `npm install cz-customizable --save-dev`
1818
* configure `commitizen` to use `cz-customizable` as plugin. Add those lines to your `package.json`:
1919

@@ -27,7 +27,7 @@ Suitable for large teams working with multiple projects with their own commit sc
2727
```
2828

2929
## You have two options to configure `cz-customizable`:
30-
* Option 1: Config block in your `package.json` (recommended):
30+
* Config block in your `package.json`:
3131
```
3232
...
3333
"config": {
@@ -41,10 +41,6 @@ Suitable for large teams working with multiple projects with their own commit sc
4141
```
4242
Note: option one allows you to have your config away from root directory. It also gives you a change to define any name to your `cz-config.js`.
4343

44-
* Option 2: (**DEPRECATED** in order to align configuration with Commitizen. Please use option 1)
45-
Run `cp ./node_modules/cz-customizable/cz-config-EXAMPLE.js ./.cz-config.js` in a project root directory to get a template.
46-
Note: if you chose option 2, config file has to be called `.cz-config.js`. This option will be removed after the next major release.
47-
4844

4945
**Notes:**
5046
* you should commit your `.cz-config.js` file to your git.

index.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,10 @@ function readConfigFile() {
2424

2525
console.info('>>> Using cz-customizable config specified in your package.json: ', pkgPath);
2626

27-
config = require(pkgPath);
28-
return config;
27+
return require(pkgPath);
2928
}
3029
}
3130

32-
// Second attempt is the nearest .cz-config.js.
33-
var config = findConfig.require(CZ_CONFIG_NAME, {home: false});
34-
35-
if (config) {
36-
console.info('>>> cz-customizable config file has been found.');
37-
return config;
38-
}
39-
4031
log.warn('Unable to find a configuration file. Please refer to documentation to learn how to ser up: https://github.com/leonardoanalista/cz-customizable#steps "');
4132
}
4233

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@
2727
"find-config": "0.3.0",
2828
"temp": "0.8.3",
2929
"winston": "2.1.0",
30-
"word-wrap": "1.1.0"
30+
"word-wrap": "1.1.0",
31+
"inquirer": "1.2.3"
3132
},
3233
"devDependencies": {
3334
"codecov.io": "0.1.6",
34-
"commitizen": "2.8.1",
35+
"commitizen": "2.9.5",
3536
"eslint": "1.9.0",
3637
"ghooks": "1.0.0",
3738
"istanbul": "0.4.0",

0 commit comments

Comments
 (0)