Skip to content

Commit

Permalink
Merge pull request #35 from leonardoanalista/issue-34
Browse files Browse the repository at this point in the history
feat: add inquirer as dependency
  • Loading branch information
leonardoanalista committed Feb 1, 2017
2 parents 1d10e2c + 7ab2559 commit 1a538c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Suitable for large teams working with multiple projects with their own commit sc


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

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

## You have two options to configure `cz-customizable`:
* Option 1: Config block in your `package.json` (recommended):
* Config block in your `package.json`:
```
...
"config": {
Expand All @@ -41,10 +41,6 @@ Suitable for large teams working with multiple projects with their own commit sc
```
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`.

* Option 2: (**DEPRECATED** in order to align configuration with Commitizen. Please use option 1)
Run `cp ./node_modules/cz-customizable/cz-config-EXAMPLE.js ./.cz-config.js` in a project root directory to get a template.
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.


**Notes:**
* you should commit your `.cz-config.js` file to your git.
Expand Down
11 changes: 1 addition & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,10 @@ function readConfigFile() {

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

config = require(pkgPath);
return config;
return require(pkgPath);
}
}

// Second attempt is the nearest .cz-config.js.
var config = findConfig.require(CZ_CONFIG_NAME, {home: false});

if (config) {
console.info('>>> cz-customizable config file has been found.');
return config;
}

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 "');
}

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@
"find-config": "0.3.0",
"temp": "0.8.3",
"winston": "2.1.0",
"word-wrap": "1.1.0"
"word-wrap": "1.1.0",
"inquirer": "1.2.3"
},
"devDependencies": {
"codecov.io": "0.1.6",
"commitizen": "2.8.1",
"commitizen": "2.9.5",
"eslint": "1.9.0",
"ghooks": "1.0.0",
"istanbul": "0.4.0",
Expand Down

0 comments on commit 1a538c3

Please sign in to comment.