Skip to content

Commit

Permalink
chore(projects): update deps, config, template
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Dec 7, 2023
1 parent 88ab858 commit 9df58e9
Show file tree
Hide file tree
Showing 26 changed files with 136 additions and 161 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ root = true

[*]
charset = utf-8
indent_style = tab
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
Expand Down
Empty file added .prettierrc
Empty file.
29 changes: 2 additions & 27 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,10 @@
{
"cSpell.words": [
"bumpp",
"consola",
"EDITMSG",
"execa",
"kolorist",
"ofetch"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"editor.formatOnSave": false,
"eslint.experimental.useFlatConfig": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"svelte",
"astro",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"css",
"html",
"toml",
"markdown"
],
"editor.formatOnSave": false,
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "json", "jsonc", "json5"],
"prettier.enable": false
}
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { defineConfig } from '@soybeanjs/eslint-config';

export default defineConfig();
export default defineConfig({ ignores: ['packages/create-soybean/template-vue/**/*.vue'] });
33 changes: 20 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,21 @@
"soybean": "dist/index.cjs",
"soy": "dist/index.cjs"
},
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"build": "pnpm typecheck && unbuild && pnpm build-pkg",
"build-pkg": "pnpm -r --filter='./packages/*' run build",
"stub": "pnpm -r run stub",
"check": "eslint .",
"build": "run-s typecheck build-only build-pkg",
"build-only": "unbuild",
"build-pkg": "pnpm -r --filter='./packages/*' run build",
"lint": "eslint . --fix",
"format": "soy prettier-write",
"commit": "soy git-commit",
"cleanup": "soy cleanup",
"update-pkg": "soy ncu",
"typecheck": "tsc --noEmit --skipLibCheck",
"publish-pkg": "pnpm -r publish --access public",
"typecheck": "tsc --noEmit",
"release": "soy release && pnpm build && pnpm publish-pkg"
"release-pkg": "soy release",
"release": "run-s release-pkg build publish-pkg",
"prepare": "pnpm build-only && simple-git-hooks"
},
"dependencies": {
"@soybeanjs/changelog": "0.3.4",
Expand All @@ -61,20 +60,28 @@
"enquirer": "2.4.1",
"execa": "8.0.1",
"kolorist": "1.8.0",
"lint-staged": "15.2.0",
"minimist": "1.2.8",
"npm-check-updates": "16.14.11",
"rimraf": "5.0.5"
},
"devDependencies": {
"@soybeanjs/cli": "link:",
"@soybeanjs/eslint-config": "1.0.2",
"@soybeanjs/eslint-config": "1.0.5",
"@types/crypto-js": "4.2.1",
"@types/node": "20.10.3",
"@types/node": "20.10.4",
"eslint": "8.55.0",
"lint-staged": "15.2.0",
"npm-run-all": "4.1.5",
"simple-git-hooks": "2.9.0",
"tsx": "4.6.2",
"typescript": "5.3.2",
"typescript": "5.3.3",
"unbuild": "2.0.0"
},
"simple-git-hooks": {
"commit-msg": "pnpm soy git-commit-verify",
"pre-commit": "pnpm typecheck && pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}
13 changes: 5 additions & 8 deletions packages/create-soybean/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
"create-soybean": "dist/index.mjs",
"create-soy": "dist/index.mjs"
},
"files": [
"dist",
"template-ts-lib",
"template-vue"
],
"files": ["dist", "template-ts-lib", "template-vue"],
"scripts": {
"build": "pnpm typecheck && unbuild",
"typecheck": "tsc --noEmit",
"build": "pnpm typecheck && pnpm build-only",
"build-only": "unbuild",
"typecheck": "tsc --noEmit --skipLibCheck",
"publish-pkg": "pnpm publish --access public --no-git-checks"
},
"dependencies": {
Expand All @@ -34,7 +31,7 @@
"devDependencies": {
"@types/minimist": "1.2.5",
"@types/prompts": "2.4.9",
"typescript": "5.3.2",
"typescript": "5.3.3",
"unbuild": "2.0.0"
}
}
5 changes: 3 additions & 2 deletions packages/create-soybean/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ const templates: Template[] = [
const TEMPLATES = templates.map(t => t.type);

const renameFiles: Record<string, string | undefined> = {
_editorconfig: '.editorconfig',
_gitignore: '.gitignore',
_eslintrc: '.eslintrc',
_npmrc: '.npmrc'
_npmrc: '.npmrc',
_prettierrc: '.prettierrc'
};

const defaultTargetDir = 'create-soybean-project';
Expand Down
1 change: 1 addition & 0 deletions packages/create-soybean/template-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "template-react-native",
"type": "module",
"version": "0.8.0",
"scripts": {}
}
1 change: 1 addition & 0 deletions packages/create-soybean/template-react/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "template-react",
"type": "module",
"version": "0.8.0",
"scripts": {}
}
1 change: 1 addition & 0 deletions packages/create-soybean/template-solid/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "template-solid",
"type": "module",
"version": "0.8.0",
"scripts": {}
}
20 changes: 2 additions & 18 deletions packages/create-soybean/template-ts-lib/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
{
"cSpell.words": [
"consola",
"execa",
"kolorist",
"ofetch"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"editor.formatOnSave": false,
"eslint.experimental.useFlatConfig": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"json",
"jsonc",
"yaml",
"toml",
"markdown"
],
"editor.formatOnSave": false,
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "json", "jsonc", "json5"],
"prettier.enable": false
}
2 changes: 1 addition & 1 deletion packages/create-soybean/template-ts-lib/_editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ root = true

[*]
charset = utf-8
indent_style = tab
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
Expand Down
Empty file.
22 changes: 12 additions & 10 deletions packages/create-soybean/template-ts-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "ts-lib-starter",
"type": "module",
"version": "0.8.0",
"private": true,
"exports": {
Expand All @@ -12,19 +13,17 @@
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"build": "pnpm typecheck && unbuild",
"typecheck": "tsc --noEmit",
"build": "run-s typecheck build-only",
"build-only": "unbuild",
"typecheck": "tsc --noEmit --skipLibCheck",
"lint": "eslint . --fix",
"format": "soy prettier-write",
"commit": "soy git-commit",
"cleanup": "soy cleanup",
"update-pkg": "soy ncu",
"publish-pkg": "pnpm publish --access public",
"release": "soy release && pnpm build && pnpm publish-pkg"
"release": "run-s \"soy release\" build publish-pkg"
},
"dependencies": {
"cli-progress": "3.12.0",
Expand All @@ -36,12 +35,15 @@
},
"devDependencies": {
"@soybeanjs/cli": "0.8.0",
"@soybeanjs/eslint-config": "1.0.2",
"@soybeanjs/eslint-config": "1.0.5",
"@types/cli-progress": "3.11.5",
"@types/node": "20.10.3",
"@types/node": "20.10.4",
"eslint": "8.55.0",
"lint-staged": "15.2.0",
"npm-run-all": "4.1.5",
"simple-git-hooks": "2.9.0",
"tsx": "4.6.2",
"typescript": "5.3.2",
"typescript": "5.3.3",
"unbuild": "2.0.0"
}
}
4 changes: 3 additions & 1 deletion packages/create-soybean/template-ts-lib/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export function fn() {}
export function fn() {
return 1;
}
6 changes: 3 additions & 3 deletions packages/create-soybean/template-ts-lib/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"outDir": "dist",
"outDir": "./dist",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
2 changes: 1 addition & 1 deletion packages/create-soybean/template-vue/_editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ root = true

[*]
charset = utf-8
indent_style = tab
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
Expand Down
34 changes: 24 additions & 10 deletions packages/create-soybean/template-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"name": "template-vue",
"type": "module",
"version": "0.8.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "run-s type-check build-only",
"preview": "vite preview",
"build": "run-s typecheck build-only",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit --skipLibCheck",
"lint": "eslint . --fix"
"preview": "vite preview",
"lint": "eslint . --fix",
"commit": "soy git-commit",
"cleanup": "soy cleanup",
"update-pkg": "soy ncu",
"typecheck": "vue-tsc --noEmit --skipLibCheck",
"prepare": "simple-git-hooks"
},
"dependencies": {
"pinia": "2.1.7",
Expand All @@ -17,14 +22,23 @@
},
"devDependencies": {
"@soybeanjs/cli": "0.8.0",
"@soybeanjs/eslint-config": "1.0.2",
"@types/node": "20.10.3",
"@vitejs/plugin-vue": "4.5.1",
"@soybeanjs/eslint-config": "1.0.5",
"@types/node": "20.10.4",
"@vitejs/plugin-vue": "4.5.2",
"@vitejs/plugin-vue-jsx": "3.1.0",
"eslint": "8.55.0",
"lint-staged": "15.2.0",
"npm-run-all": "4.1.5",
"typescript": "5.3.2",
"vite": "5.0.5",
"vue-tsc": "1.8.24"
"simple-git-hooks": "2.9.0",
"typescript": "5.3.3",
"vite": "5.0.6",
"vue-tsc": "1.8.25"
},
"simple-git-hooks": {
"commit-msg": "pnpm soy git-commit-verify",
"pre-commit": "pnpm typecheck && pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}
3 changes: 2 additions & 1 deletion packages/create-soybean/template-vue/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@/*": ["./src/*"]
},
"resolveJsonModule": true,
"types": ["vite/client", "node"],
"types": ["node", "vite/client"],
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
Expand All @@ -21,5 +21,6 @@
"forceConsistentCasingInFileNames": true,
"isolatedModules": true
},
"include": ["./**/*.ts", "./**/*.tsx", "./**/*.vue"],
"exclude": ["node_modules", "dist"]
}
4 changes: 2 additions & 2 deletions packages/create-soybean/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"outDir": "./dist",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
Expand Down
Loading

0 comments on commit 9df58e9

Please sign in to comment.