diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4a5196f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js -cache: - directories: - - ~/.npm -notifications: - email: false -node_js: - - '10' - - '9' - - '8' -script: - - npm run lint - - npm run test - - npm run test:coverage - - npm run test:check-coverage -after_success: - - npm run travis-deploy-once "npm run semantic-release" -branches: - except: - - /^v\d+\.\d+\.\d+$/ diff --git a/README.md b/README.md index d3316af..e43bb2e 100644 --- a/README.md +++ b/README.md @@ -15,24 +15,28 @@ Suitable for large teams working with multiple projects with their own commit sc You have two ways to use `cz-customizable`. Originally, this project started as a commitizen plugin (Option 1). We introduced the second option to run this `cz-customizable` in standalone mode (Option 2), just like any NodeJS script. It's recommended to use `Option 2` for simplicity. The way you configure is shared between both options. +# Quick start **(New, recommended)** +## Configuration -## Option 1 - cz-customizable as commitizen plugin +* Copy contents of [the example config file](./cz-config-EXAMPLE.js) and paste into a new file `.cz-config.js` +* move file `cz-config.js` to your home directory. -* install commitizen in case you don't have it: `npm install -g commitizen`. Make sure you have the latest version of commitizen installed globally. +## cz-customizable via global install -* configure `commitizen` to use `cz-customizable` as plugin. Add those lines to your `package.json`: +`npm i cz-customizable -g` -``` -... -"config": { - "commitizen": { - "path": "node_modules/cz-customizable" - } -} -``` +Then run `cz-customizable` from your root repo. You can also use the alias `cz-cust`. + +If everything is correct, you should see commit questions like the image above. + +# Slow start + +## Option 1 - Even better: cz-customizable via npx + +`npx cz-customizable` -## Option 2 - cz-customizable in standalone mode **(New)** +## Option 2 - cz-customizable in standalone mode Use `cz-customizable` without `commitzen`. @@ -50,7 +54,23 @@ Use `cz-customizable` without `commitzen`. * now run: `npm run commit`. -## Configuration (Shared between options 1 and 2) +## Option 3 - cz-customizable as commitizen plugin + +* install commitizen in case you don't have it: `npm install -g commitizen`. Make sure you have the latest version of commitizen installed globally. + +* configure `commitizen` to use `cz-customizable` as plugin. Add those lines to your `package.json`: + +``` +... +"config": { + "commitizen": { + "path": "node_modules/cz-customizable" + } +} +``` + + +## Configuration (Shared between options 1,2 and 3) * Copy contents of [the example config file](./cz-config-EXAMPLE.js) and paste into a new file `.cz-config.js` @@ -75,13 +95,13 @@ Use `cz-customizable` without `commitzen`. 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 - No Changes to your git repository*. +### No Changes to your git repository*. This is suitable when your team is not ready to roll `cz-customizable` across all teams but you still would like to use it for your own commits, no matter the project. Steps: * create config file: - * create a file called `.cz-config.js` in your git repository root (*Asumptions: you do a global git ignore on `~/.gitignore_global` for `.cz-config.js`). Or; + * create a file called `.cz-config.js` in your git repository root (*Assumptions: you git ignore global on `~/.gitignore_global` for `.cz-config.js`). Or; * create a file called `.cz-config.js` your home directory. #### Additional steps when used as commitizen plugin diff --git a/package.json b/package.json index 339d554..57b4a95 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "index.js", "types": "index.d.ts", "bin": { - "cz-customizable": "./standalone.js" + "cz-customizable": "./standalone.js", + "cz-cust": "./standalone.js" }, "scripts": { "lint": "node_modules/eslint/bin/eslint.js *.js __tests__/**.js",