Skip to content

Commit 445cd0e

Browse files
committed
chore: streamline development setup
1 parent 0fc6c04 commit 445cd0e

File tree

11 files changed

+43
-20
lines changed

11 files changed

+43
-20
lines changed

Diff for: @commitlint/cli/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
"scripts": {
99
"build": "exit 0",
1010
"clean": "exit 0",
11+
"prepublish": "npm test",
1112
"pretest": "dep-check",
12-
"test": "ava",
13-
"prepublish": "npm test"
13+
"start": "ava --watch --verbose",
14+
"test": "ava $AVA_VERBOSE"
1415
},
1516
"ava": {
1617
"files": [

Diff for: @commitlint/config-angular/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
"version": "3.1.1",
44
"description": "Shareable commitlint config enforcing the angular commit convention",
55
"scripts": {
6+
"clean": "exit 0",
67
"pretest": "dep-check",
7-
"test": "exit 0",
8-
"clean": "exit 0"
8+
"start": "exit 0",
9+
"test": "exit 0"
910
},
1011
"xo": false,
1112
"repository": {

Diff for: @commitlint/config-lerna-scopes/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "Shareable commitlint config enforcing lerna package names as scopes",
55
"scripts": {
66
"pretest": "dep-check",
7-
"test": "ava",
7+
"start": "ava --watch --verbose",
8+
"test": "ava $AVA_VERBOSE",
89
"clean": "exit 0"
910
},
1011
"xo": false,

Diff for: @commitlint/config-patternplate/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Lint your commits, patternplate-style",
55
"scripts": {
66
"pretest": "dep-check",
7+
"start": "exit 0",
78
"test": "exit 0",
89
"clean": "exit 0"
910
},

Diff for: @commitlint/core/package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
"description": "Lint your commit messages",
55
"main": "lib/index.js",
66
"scripts": {
7-
"pretest": "dep-check",
8-
"test": "ava -c 4",
97
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
10-
"watch": "babel src --out-dir lib --watch --source-maps",
118
"clean": "rimraf lib",
12-
"prepublish": "npm run build"
9+
"prepublish": "npm run build",
10+
"pretest": "dep-check",
11+
"start": "concurrently \"ava -c 4 --verbose --watch\" \"npm run watch\"",
12+
"test": "ava -c 4 $AVA_VERBOSE",
13+
"watch": "babel src --out-dir lib --watch --source-maps"
1314
},
1415
"ava": {
1516
"files": [
@@ -68,6 +69,7 @@
6869
"babel-cli": "^6.26.0",
6970
"babel-preset-commitlint": "^3.2.0",
7071
"babel-register": "^6.26.0",
72+
"concurrently": "^3.5.0",
7173
"cross-env": "^5.0.1",
7274
"denodeify": "1.2.1",
7375
"dependency-check": "2.7.0",

Diff for: @commitlint/prompt/package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
"main": "./lib/index.js",
66
"scripts": {
77
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
8-
"watch": "babel src --out-dir lib --watch --source-maps",
98
"clean": "rimraf lib",
109
"commit": "git-cz",
10+
"prepublish": "npm run build",
1111
"pretest": "dep-check",
12-
"test": "ava",
13-
"prepublish": "npm run build"
12+
"start": "concurrently \"ava --watch --verbose\" \"npm run watch\"",
13+
"test": "ava $AVA_VERBOSE",
14+
"watch": "babel src --out-dir lib --watch --source-maps"
1415
},
1516
"ava": {
1617
"babel": "inherit",
@@ -59,6 +60,7 @@
5960
"babel-preset-commitlint": "^3.2.0",
6061
"babel-register": "^6.24.1",
6162
"commitizen": "^2.9.6",
63+
"concurrently": "^3.5.0",
6264
"cross-env": "^5.0.1",
6365
"throat": "^4.1.0"
6466
},

Diff for: @packages/babel-preset-commitlint/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"pretest": "dep-check",
8-
"test": "ava"
8+
"start": "ava --watch --verbose",
9+
"test": "ava $AVA_VERBOSE"
910
},
1011
"ava": {
1112
"files": [

Diff for: @packages/test/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"private": true,
77
"scripts": {
88
"pretest": "dep-check",
9-
"test": "ava -c 4",
9+
"start": "concurrently \"ava --watch --verbose\" \"npm run watch\"",
10+
"test": "ava $AVA_VERBOSE",
1011
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
1112
"watch": "babel src --out-dir lib --watch --source-maps",
1213
"clean": "rimraf lib",
@@ -64,6 +65,7 @@
6465
"babel-cli": "^6.26.0",
6566
"babel-preset-commitlint": "^3.2.0",
6667
"babel-register": "^6.26.0",
68+
"concurrently": "^3.5.0",
6769
"cross-env": "^5.0.1",
6870
"rimraf": "2.6.1"
6971
}

Diff for: @packages/utils/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"scripts": {
99
"build": "exit 0",
1010
"clean": "exit 0",
11+
"start": "exit 0",
1112
"test": "exit 0",
1213
"prepublish": "npm test"
1314
},

Diff for: README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,18 @@ Copyright by @marionebl. All `commitlint` packages are released under the MIT li
8484
```sh
8585
git clone [email protected]:marionebl/commitlint.git
8686
cd commitlint
87-
npm install
88-
npm start # run tests, again on change
89-
npm run build # run build tasks
87+
npx npm install
88+
npx npm start # run tests, again on change
89+
npx npm run build # run build tasks
90+
```
91+
92+
### Publishing a release
93+
94+
```sh
95+
npx npm run clean
96+
npx npm install
97+
npx npm test
98+
npx npm run publish
9099
```
91100

92101

Diff for: package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@
55
"version": "1.0.0",
66
"license": "MIT",
77
"scripts": {
8-
"clean": "lerna clean --yes && lerna run clean",
8+
"build": "lerna run build --stream --parallel --include-filtered-dependencies",
9+
"clean": "lerna clean --yes && lerna run clean --stream --parallel --include-filtered-dependencies",
910
"commit": "./@commitlint/prompt-cli/cli.js",
1011
"commitmsg": "./@commitlint/cli/cli.js -e",
1112
"docs": "docsify serve docs",
1213
"postinstall": "lerna bootstrap",
1314
"precommit": "lint-staged",
1415
"pretest": "xo",
15-
"reinstall": "npm run clean && npm install",
1616
"publish": "lerna publish --conventional-commits",
17-
"test": "lerna run test",
17+
"reinstall": "npm run clean && npm install",
18+
"start": "lerna run start --stream --parallel --include-filtered-dependencies",
19+
"test": "AVA_VERBOSE=--verbose lerna run test --stream --parallel --include-filtered-dependencies",
1820
"travis": "trevor"
1921
},
2022
"lint-staged": {

0 commit comments

Comments
 (0)