Skip to content

Commit c2251a6

Browse files
committed
feat: 改用 pnpm,更新 deps
1 parent 68a249a commit c2251a6

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

bin/create.cjs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ const { execRemove, execRemoveFile } = require('./utils/remove.cjs')
55
const projectName = process?.argv?.[2] || ''
66

77
async function main() {
8-
// can be shell command or callback function
8+
// can be shell command or callback function
99

10-
const commands = [
11-
`git clone https://github.com/j7-dev/wp-refine-plugin.git ${projectName}`,
12-
`cd ${projectName}`,
13-
'yarn',
14-
`node ./replace-string.cjs ${projectName}`,
15-
'composer install --no-interaction',
16-
execRemove('.git'),
17-
execRemove('bin'),
18-
execRemoveFile('replace-string.cjs'),
19-
execRemoveFile('README.md'),
20-
]
21-
const results = await runCommands(...commands)
10+
const commands = [
11+
`git clone https://github.com/j7-dev/wp-refine-plugin.git ${projectName}`,
12+
`cd ${projectName}`,
13+
'pnpm install',
14+
`node ./replace-string.cjs ${projectName}`,
15+
'composer install --no-interaction',
16+
execRemove('.git'),
17+
execRemove('bin'),
18+
execRemoveFile('replace-string.cjs'),
19+
execRemoveFile('README.md'),
20+
]
21+
const results = await runCommands(...commands)
2222
}
2323

2424
main()

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
}
3030
},
3131
"require": {
32-
"kucrut/vite-for-wp": "^0.10.0",
33-
"j7-dev/wp-utils": "0.3.19"
32+
"kucrut/vite-for-wp": "^0.12",
33+
"j7-dev/wp-utils": "^0.3"
3434
},
3535
"require-dev": {
3636
"squizlabs/php_codesniffer": "@stable",

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"version": "4.0.6",
55
"type": "module",
66
"scripts": {
7-
"bootstrap": "yarn install && composer install --no-interaction",
7+
"bootstrap": "pnpm install && composer install --no-interaction",
88
"dev": "vite",
99
"prebuild": "echo 'todo: remove console'",
1010
"build": "vite build && node release/mv-manifest.cjs",
1111
"preview": "vite preview",
1212
"format": "prettier-eslint --write \"js/src/**/*.tsx\"",
13-
"lint": "yarn eslint ./js/src/*.{ts,tsx} --ext .ts,.tsx && phpcbf",
14-
"lint:fix": "yarn eslint ./js/src/*.{ts,tsx} --fix && phpcbf",
13+
"lint": "pnpm eslint ./js/src/*.{ts,tsx} --ext .ts,.tsx && phpcbf",
14+
"lint:fix": "pnpm eslint ./js/src/*.{ts,tsx} --fix && phpcbf",
1515
"release": "env-cmd -f ./.env release-it patch --ci --verbose --config ./release/.release-it.cjs",
1616
"release:build-only": "env-cmd -f ./.env release-it patch --ci --verbose --config ./release/.release-it.cjs --build-only",
1717
"release:patch": "env-cmd -f ./.env release-it patch --ci --verbose --config ./release/.release-it.cjs",
@@ -22,7 +22,7 @@
2222
"sync:version": "wp-update-project-version -s package.json -p plugin.php",
2323
"replace-string": "node ./replace-string.cjs",
2424
"i18n": "wp i18n make-pot . languages/wp_refine_plugin.pot",
25-
"i18n:commit": "yarn i18n && git add . && git commit --amend --no-edit"
25+
"i18n:commit": "pnpm i18n && git add . && git commit --amend --no-edit"
2626
},
2727
"dependencies": {
2828
"@refinedev/antd": "5.45.1",
@@ -38,7 +38,7 @@
3838
"react-dom": "^18.2.0"
3939
},
4040
"devDependencies": {
41-
"@kucrut/vite-for-wp": "^0.8.0",
41+
"@kucrut/vite-for-wp": "^0.12.0",
4242
"@rollup/plugin-alias": "^5.1.0",
4343
"@soderlind/wp-project-version-sync": "^2.0.2",
4444
"@tanstack/react-query-devtools": "^5.28.14",
@@ -71,7 +71,8 @@
7171
"prettier-eslint": "^16.3.0",
7272
"prettier-eslint-cli": "^8.0.1",
7373
"prettier-plugin-multiline-arrays": "^3.0.4",
74-
"release-it": "^17.1.1",
74+
"release-it": "^19.0.3",
75+
"release-it-pnpm": "^4.6.6",
7576
"replace-in-file": "^7.1.0",
7677
"sass": "^1.72.0",
7778
"tailwindcss": "^3.4.3",
@@ -80,8 +81,7 @@
8081
"vite": "^5.2.7",
8182
"vite-plugin-live-reload": "^3.0.3",
8283
"vite-tsconfig-paths": "^4.3.2",
83-
"yargs": "^17.7.2",
84-
"yarn-upgrade-all": "^0.7.2"
84+
"yargs": "^17.7.2"
8585
},
8686
"bin": "./bin/create.cjs"
87-
}
87+
}

0 commit comments

Comments
 (0)