Skip to content

Commit

Permalink
feat: 新增cli模板,完成模板创建功能
Browse files Browse the repository at this point in the history
  • Loading branch information
hacxy committed Dec 15, 2024
1 parent e2d76f0 commit 3e03cd4
Show file tree
Hide file tree
Showing 49 changed files with 5,078 additions and 9 deletions.
5 changes: 4 additions & 1 deletion build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ export default defineBuildConfig({
clean: true,
declaration: false,
sourcemap: false,
rollup: { esbuild: { target: 'node18', minify: true } },
rollup: {
esbuild: { target: 'node18', minify: true }
},

});
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import linter from '@hacxy/eslint-config/nodejs';

export default linter({
yaml: true,
ignores: ['scripts']
ignores: ['scripts/git-hooks/**', 'templates']
});
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
},
"files": [
"dist",
"index.js"
"index.js",
"templates"
],
"engines": {
"node": "^18.0.0 || >=20.0.0"
Expand All @@ -35,15 +36,22 @@
"prepare": "simple-git-hooks",
"prepublishOnly": "npm run build",
"test": "vitest run",
"coverage": "vitest run --coverage"
"coverage": "vitest run --coverage",
"sync": "node scripts/utils/sync-template.mjs"
},
"dependencies": {
"@inquirer/prompts": "^7.2.0",
"ora": "^8.1.1"
},
"devDependencies": {
"@hacxy/eslint-config": "^0.0.4",
"@types/degit": "^2.8.6",
"@types/node": "^20.12.5",
"@vitest/coverage-istanbul": "2.1.8",
"bumpp": "^9.9.0",
"commitizen": "^4.3.1",
"cz-git": "^1.11.0",
"degit": "^2.8.4",
"eslint": "^9.16.0",
"lint-staged": "^15.2.11",
"simple-git-hooks": "^2.11.1",
Expand All @@ -52,7 +60,7 @@
"vitest": "^2.1.8"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged",
"pre-commit": "npx lint-staged",
"commit-msg": "node scripts/git-hooks/commit-msg.mjs"
},
"lint-staged": {
Expand Down
Loading

0 comments on commit 3e03cd4

Please sign in to comment.