Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"scripts": {
"add-contributor": "node src contributors add",
"commit": "node src commit",
"build": "node src build",
"format": "node src format",
"lint": "node src lint",
Expand All @@ -30,7 +31,7 @@
"prettier.js",
"jest.js"
],
"keywords": [],
"keywords": ["scripts"],
"author": "IOpipe <[email protected]> (https://iopipe.com/)",
"license": "MIT",
"dependencies": {
Expand All @@ -55,13 +56,16 @@
"babel-plugin-transform-react-remove-prop-types": "^0.4.10",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"commitizen": "^2.9.6",
"concurrently": "^3.5.1",
"cross-env": "^5.1.1",
"cross-spawn": "^5.1.0",
"cz-conventional-changelog": "^2.1.0",
"doctoc": "^1.3.0",
"eslint": "4.13.1",
"eslint-config-prettier": "^2.8.0",
"eslint-plugin-prettier": "^2.3.1",
"get-installed-path": "^4.0.8",
"glob": "^7.1.2",
"husky": "^0.14.3",
"is-ci": "^1.0.10",
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Usage: ../ [script] [--flags]

Available Scripts:
build
commit
contributors
format
lint
Expand Down
21 changes: 21 additions & 0 deletions src/scripts/commit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const path = require('path');
const { getInstalledPathSync } = require('get-installed-path');

try {
const cliPath = getInstalledPathSync('commitizen', {
paths: process.mainModule.paths
});
const gitCzPath = path.resolve(cliPath, './dist/cli/git-cz.js');
const gitCz = require(gitCzPath);
const adapterPath = getInstalledPathSync('cz-conventional-changelog', {
paths: process.mainModule.paths
});
gitCz.bootstrap({
cliPath,
config: {
path: adapterPath
}
});
} catch (err) {
throw err;
}
Loading