Skip to content

Commit d38bade

Browse files
committed
refactor: migrate to pnpm
1 parent b7d269f commit d38bade

File tree

9 files changed

+7765
-4639
lines changed

9 files changed

+7765
-4639
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,18 @@ dist
33
yarn-error.log
44
.env*
55
coverage
6+
node_modules
7+
dist
8+
.env*
9+
!.env.example
10+
11+
node_modules
12+
dist
13+
.env*
14+
!.env.example
15+
16+
node_modules
17+
dist
18+
.env*
19+
!.env.example
20+

.husky/commit-msg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
echo "## .husky/$(basename "$0") (node $(node -v))"
5+
pnpm commitlint --edit $1

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
echo "## .husky/$(basename "$0") (node $(node -v))"
5+
pnpm lint-staged

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dist
2+
pnpm-lock.yaml
3+
dist
4+
pnpm-lock.yaml
5+
dist
6+
pnpm-lock.yaml

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,5 @@ import { readEngrave } from 'ngrv';
4949
// read the files and set information into the process.env
5050
readEngrave();
5151
```
52+
# ngrv
53+
# ngrv

package.json

Lines changed: 63 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,92 @@
11
{
22
"name": "ngrv",
33
"version": "1.0.8",
4-
"main": "dist/index.js",
4+
"license": "MIT",
5+
"publishConfig": {
6+
"access": "public"
7+
},
8+
"packageManager": "[email protected]",
59
"author": "thilllon <[email protected]>",
610
"repository": {
711
"type": "git",
812
"url": "https://github.com/thilllon/ngrv.git"
913
},
10-
"license": "MIT",
11-
"bin": "dist/cli.js",
14+
"main": "dist/index.js",
1215
"types": "dist/index.d.ts",
13-
"publishConfig": {
14-
"access": "public"
15-
},
16+
"bin": "dist/cli.js",
1617
"files": [
1718
"dist"
1819
],
1920
"scripts": {
20-
"build": "tsc",
21+
"dev": "tsx src/index.ts",
22+
"build": "tsup",
23+
"build:tsc": "tsc",
2124
"start": "node dist/index.js",
2225
"test": "jest",
23-
"commit": "npx cz"
26+
"prepare": "husky install && chmod +x .husky/*",
27+
"format": "prettier --write --list-different .",
28+
"release": "pnpm format && pnpm lint && pnpm test && pnpm build && release-it",
29+
"lint": "eslint --fix ."
30+
},
31+
"config": {
32+
"commitizen": {
33+
"path": "cz-conventional-changelog"
34+
}
35+
},
36+
"commitlint": {
37+
"extends": [
38+
"@commitlint/config-conventional",
39+
"@commitlint/config-conventional",
40+
"@commitlint/config-conventional"
41+
]
42+
},
43+
"prettier": {
44+
"printWidth": 100,
45+
"singleQuote": true
46+
},
47+
"release-it": {
48+
"git": {
49+
"commitMessage": "chore: release v${version}"
50+
},
51+
"github": {
52+
"release": "true"
53+
}
2454
},
2555
"dependencies": {
2656
"chalk": "4.1.2",
2757
"commander": "^9.4.1"
2858
},
2959
"devDependencies": {
60+
"@commitlint/cli": "^17.3.0",
61+
"@commitlint/config-conventional": "^17.3.0",
3062
"@types/jest": "^29.2.0",
31-
"@types/node": "^18.11.8",
32-
"commitizen": "^4.2.5",
63+
"@types/node": "^18.11.18",
64+
"@typescript-eslint/eslint-plugin": "^5.48.0",
65+
"@typescript-eslint/parser": "^5.48.0",
66+
"commitizen": "^4.2.6",
67+
"commitlint": "^17.3.0",
3368
"cz-conventional-changelog": "^3.3.0",
69+
"eslint": "^8.31.0",
70+
"git-cz": "^4.9.0",
71+
"husky": "^8.0.0",
3472
"jest": "^29.2.2",
73+
"lint-staged": "^13.1.0",
3574
"np": "^7.6.2",
36-
"prettier": "^2.7.1",
75+
"prettier": "^2.8.1",
76+
"release-it": "^15.6.0",
3777
"ts-jest": "^29.0.3",
3878
"ts-node-dev": "^2.0.0",
39-
"typescript": "^4.8.4"
79+
"tsup": "^6.5.0",
80+
"typescript": "^4.9.4"
81+
},
82+
"lint-staged": {
83+
"**/src/**/*": [
84+
"prettier -w -l",
85+
"eslint --fix",
86+
"prettier -w -l",
87+
"eslint --fix",
88+
"prettier -w -l",
89+
"eslint --fix"
90+
]
4091
}
4192
}

0 commit comments

Comments
 (0)