create-soybean 1.0.0-beta.5 → 1.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +3 -1
  2. package/package.json +3 -3
  3. package/template-pnpm-monorepo/.vscode/extensions.json +13 -0
  4. package/template-pnpm-monorepo/.vscode/launch.json +13 -0
  5. package/template-pnpm-monorepo/.vscode/settings.json +10 -0
  6. package/template-pnpm-monorepo/_editorconfig +11 -0
  7. package/template-pnpm-monorepo/_gitattributes +21 -0
  8. package/template-pnpm-monorepo/_gitignore +30 -0
  9. package/template-pnpm-monorepo/_npmrc +3 -0
  10. package/template-pnpm-monorepo/_prettierrc +0 -0
  11. package/template-pnpm-monorepo/package.json +33 -0
  12. package/template-pnpm-monorepo/packages/demo-pkg/package.json +14 -0
  13. package/template-pnpm-monorepo/packages/demo-pkg/tsconfig.json +24 -0
  14. package/template-pnpm-monorepo/pnpm-workspace.yaml +2 -0
  15. package/template-pnpm-monorepo/src/index.ts +3 -0
  16. package/template-react/_eslintrc +3 -0
  17. package/template-react/_gitignore +34 -0
  18. package/template-react/_npmrc +2 -0
  19. package/template-react/package.json +6 -0
  20. package/template-react-native/_eslintrc +3 -0
  21. package/template-react-native/_gitignore +34 -0
  22. package/template-react-native/_npmrc +2 -0
  23. package/template-react-native/package.json +6 -0
  24. package/template-solid/_eslintrc +3 -0
  25. package/template-solid/_gitignore +34 -0
  26. package/template-solid/_npmrc +2 -0
  27. package/template-solid/package.json +6 -0
  28. package/template-ts-lib-tsup/.github/workflows/release.yml +46 -0
  29. package/template-ts-lib-tsup/.vscode/extensions.json +13 -0
  30. package/template-ts-lib-tsup/.vscode/launch.json +13 -0
  31. package/template-ts-lib-tsup/.vscode/settings.json +10 -0
  32. package/template-ts-lib-tsup/_editorconfig +11 -0
  33. package/template-ts-lib-tsup/_gitattributes +21 -0
  34. package/template-ts-lib-tsup/_gitignore +30 -0
  35. package/template-ts-lib-tsup/_npmrc +2 -0
  36. package/template-ts-lib-tsup/_prettierrc +0 -0
  37. package/template-ts-lib-tsup/eslint.config.js +3 -0
  38. package/template-ts-lib-tsup/package.json +58 -0
  39. package/template-ts-lib-tsup/src/index.ts +3 -0
  40. package/template-ts-lib-tsup/tsconfig.json +24 -0
  41. package/template-ts-lib-tsup/tsup.config.ts +13 -0
  42. package/template-ts-lib-unbuild/.github/workflows/release.yml +46 -0
  43. package/template-ts-lib-unbuild/.vscode/extensions.json +13 -0
  44. package/template-ts-lib-unbuild/.vscode/launch.json +13 -0
  45. package/template-ts-lib-unbuild/.vscode/settings.json +10 -0
  46. package/template-ts-lib-unbuild/_editorconfig +11 -0
  47. package/template-ts-lib-unbuild/_gitattributes +21 -0
  48. package/template-ts-lib-unbuild/_gitignore +30 -0
  49. package/template-ts-lib-unbuild/_npmrc +2 -0
  50. package/template-ts-lib-unbuild/_prettierrc +0 -0
  51. package/template-ts-lib-unbuild/build.config.ts +19 -0
  52. package/template-ts-lib-unbuild/eslint.config.js +3 -0
  53. package/template-ts-lib-unbuild/package.json +57 -0
  54. package/template-ts-lib-unbuild/src/index.ts +3 -0
  55. package/template-ts-lib-unbuild/tsconfig.json +24 -0
  56. package/template-vue/package.json +2 -2
package/README.md CHANGED
@@ -4,5 +4,7 @@ SoybeanJS's command line to create different project templates
4
4
 
5
5
  ## currently support
6
6
 
7
- - template-ts-lib: use unbuild to build TypeScript library
7
+ - template-ts-lib-tsup: use tsup to build TypeScript library
8
+ - template-ts-lib-unbuild: use unbuild to build TypeScript library
9
+ - template-pnpm-monorepo: create a monorepo project with pnpm
8
10
  - template-vue: create a vue project quickly with eslint, simple-git-hooks and lint-staged
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "create-soybean",
3
- "version": "1.0.0-beta.5",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.7",
4
5
  "description": "SoybeanJS's command line to create different project templates",
5
6
  "author": {
6
7
  "name": "Soybean",
@@ -24,8 +25,7 @@
24
25
  },
25
26
  "files": [
26
27
  "dist",
27
- "template-ts-lib",
28
- "template-vue"
28
+ "template-*"
29
29
  ],
30
30
  "dependencies": {
31
31
  "consola": "3.2.3",
@@ -0,0 +1,13 @@
1
+ {
2
+ "recommendations": [
3
+ "antfu.unocss",
4
+ "dbaeumer.vscode-eslint",
5
+ "editorconfig.editorconfig",
6
+ "esbenp.prettier-vscode",
7
+ "formulahendry.auto-complete-tag",
8
+ "formulahendry.auto-close-tag",
9
+ "formulahendry.auto-rename-tag",
10
+ "kisstkondoros.vscode-gutter-preview",
11
+ "mhutchie.git-graph"
12
+ ]
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "configurations": [
4
+ {
5
+ "type": "node",
6
+ "request": "launch",
7
+ "name": "TS debugger",
8
+ "skipFiles": ["<node_internals>/**"],
9
+ "runtimeArgs": ["--loader", "tsx"],
10
+ "program": "${relativeFile}"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "editor.codeActionsOnSave": {
3
+ "source.fixAll.eslint": "explicit",
4
+ "source.organizeImports": "never"
5
+ },
6
+ "eslint.experimental.useFlatConfig": true,
7
+ "editor.formatOnSave": false,
8
+ "eslint.validate": ["json", "jsonc"],
9
+ "prettier.enable": false
10
+ }
@@ -0,0 +1,11 @@
1
+ # Editor configuration, see http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ indent_style = space
8
+ indent_size = 2
9
+ end_of_line = lf
10
+ trim_trailing_whitespace = true
11
+ insert_final_newline = true
@@ -0,0 +1,21 @@
1
+ "*.js" eol=lf
2
+ "*.ts" eol=lf
3
+ "*.jsx" eol=lf
4
+ "*.tsx" eol=lf
5
+ "*.cjs" eol=lf
6
+ "*.cts" eol=lf
7
+ "*.mjs" eol=lf
8
+ "*.mts" eol=lf
9
+ "*.html" eol=lf
10
+ "*.css" eol=lf
11
+ "*.vue" eol=lf
12
+ "*.json" eol=lf
13
+ "*.less" eol=lf
14
+ "*.scss" eol=lf
15
+ "*.sass" eol=lf
16
+ "*.styl" eol=lf
17
+ "*.svelte" eol=lf
18
+ "*.md" eol=lf
19
+ "*.yml" eol=lf
20
+ "*.astro" eol=lf
21
+ "*.mdx" eol=lf
@@ -0,0 +1,30 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ .DS_Store
12
+ dist
13
+ dist-ssr
14
+ coverage
15
+ *.local
16
+
17
+ /cypress/videos/
18
+ /cypress/screenshots/
19
+
20
+ # Editor directories and files
21
+ .vscode/*
22
+ !.vscode/extensions.json
23
+ !.vscode/settings.json
24
+ !.vscode/launch.json
25
+ .idea
26
+ *.suo
27
+ *.ntvs*
28
+ *.njsproj
29
+ *.sln
30
+ *.sw?
@@ -0,0 +1,3 @@
1
+ registry=https://registry.npmmirror.com/
2
+ shamefully-hoist=true
3
+ ignore-workspace-root-check=true
File without changes
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "pnpm-monorepo",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.7",
5
+ "private": true,
6
+ "packageManager": "pnpm@8.12.0",
7
+ "scripts": {
8
+ "cleanup": "soy cleanup",
9
+ "commit": "soy git-commit",
10
+ "lint": "eslint . --fix",
11
+ "prepare": "simple-git-hooks",
12
+ "release": "soy release",
13
+ "typecheck": "tsc --noEmit --skipLibCheck",
14
+ "update-pkg": "soy ncu"
15
+ },
16
+ "dependencies": {},
17
+ "devDependencies": {
18
+ "@soybeanjs/cli": "1.0.0-beta.6",
19
+ "@soybeanjs/eslint-config": "1.0.12",
20
+ "eslint": "8.55.0",
21
+ "lint-staged": "15.2.0",
22
+ "simple-git-hooks": "2.9.0",
23
+ "tsx": "4.6.2",
24
+ "typescript": "5.3.3"
25
+ },
26
+ "simple-git-hooks": {
27
+ "commit-msg": "pnpm soy git-commit-verify",
28
+ "pre-commit": "pnpm typecheck && pnpm lint-staged"
29
+ },
30
+ "lint-staged": {
31
+ "*": "eslint --fix"
32
+ }
33
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "demo-pkg",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.7",
5
+ "private": true,
6
+ "packageManager": "pnpm@8.12.0",
7
+ "scripts": {
8
+ "typecheck": "tsc --noEmit --skipLibCheck"
9
+ },
10
+ "dependencies": {},
11
+ "devDependencies": {
12
+ "typescript": "5.3.3"
13
+ }
14
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "jsx": "preserve",
5
+ "lib": ["DOM", "ESNext"],
6
+ "baseUrl": ".",
7
+ "module": "ESNext",
8
+ "moduleResolution": "node",
9
+ "paths": {
10
+ "@/*": ["./src/*"]
11
+ },
12
+ "resolveJsonModule": true,
13
+ "types": ["node"],
14
+ "strict": true,
15
+ "strictNullChecks": true,
16
+ "noUnusedLocals": true,
17
+ "outDir": "./dist",
18
+ "allowSyntheticDefaultImports": true,
19
+ "esModuleInterop": true,
20
+ "forceConsistentCasingInFileNames": true
21
+ },
22
+ "include": ["src/**/*"],
23
+ "exclude": ["node_modules", "dist"]
24
+ }
@@ -0,0 +1,2 @@
1
+ packages:
2
+ - 'packages/*'
@@ -0,0 +1,3 @@
1
+ export function fn() {
2
+ return 1;
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "soybeanjs/react"
3
+ }
@@ -0,0 +1,34 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ .DS_Store
12
+ dist
13
+ dist-ssr
14
+ coverage
15
+ *.local
16
+
17
+ /cypress/videos/
18
+ /cypress/screenshots/
19
+
20
+ # Editor directories and files
21
+ .vscode/*
22
+ !.vscode/extensions.json
23
+ !.vscode/settings.json
24
+ !.vscode/launch.json
25
+ .idea
26
+ *.suo
27
+ *.ntvs*
28
+ *.njsproj
29
+ *.sln
30
+ *.sw?
31
+
32
+ package-lock.json
33
+ yarn.lock
34
+ pnpm-lock.yaml
@@ -0,0 +1,2 @@
1
+ registry=https://registry.npmmirror.com/
2
+ shamefully-hoist=true
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "template-react",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.7",
5
+ "scripts": {}
6
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "soybeanjs/react-native"
3
+ }
@@ -0,0 +1,34 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ .DS_Store
12
+ dist
13
+ dist-ssr
14
+ coverage
15
+ *.local
16
+
17
+ /cypress/videos/
18
+ /cypress/screenshots/
19
+
20
+ # Editor directories and files
21
+ .vscode/*
22
+ !.vscode/extensions.json
23
+ !.vscode/settings.json
24
+ !.vscode/launch.json
25
+ .idea
26
+ *.suo
27
+ *.ntvs*
28
+ *.njsproj
29
+ *.sln
30
+ *.sw?
31
+
32
+ package-lock.json
33
+ yarn.lock
34
+ pnpm-lock.yaml
@@ -0,0 +1,2 @@
1
+ registry=https://registry.npmmirror.com/
2
+ shamefully-hoist=true
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "template-react-native",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.7",
5
+ "scripts": {}
6
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "soybeanjs/solid"
3
+ }
@@ -0,0 +1,34 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ .DS_Store
12
+ dist
13
+ dist-ssr
14
+ coverage
15
+ *.local
16
+
17
+ /cypress/videos/
18
+ /cypress/screenshots/
19
+
20
+ # Editor directories and files
21
+ .vscode/*
22
+ !.vscode/extensions.json
23
+ !.vscode/settings.json
24
+ !.vscode/launch.json
25
+ .idea
26
+ *.suo
27
+ *.ntvs*
28
+ *.njsproj
29
+ *.sln
30
+ *.sw?
31
+
32
+ package-lock.json
33
+ yarn.lock
34
+ pnpm-lock.yaml
@@ -0,0 +1,2 @@
1
+ registry=https://registry.npmmirror.com/
2
+ shamefully-hoist=true
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "template-solid",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.7",
5
+ "scripts": {}
6
+ }
@@ -0,0 +1,46 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ release:
10
+ permissions:
11
+ id-token: write
12
+ contents: write
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: Install pnpm
20
+ uses: pnpm/action-setup@v2
21
+
22
+ - name: Set node
23
+ uses: actions/setup-node@v3
24
+ with:
25
+ node-version: lts/*
26
+ cache: pnpm
27
+ registry-url: "https://registry.npmjs.org"
28
+
29
+ - run: npx githublogen
30
+ env:
31
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32
+
33
+ - name: Install Dependencies
34
+ run: pnpm install --no-frozen-lockfile
35
+
36
+ - name: PNPM build
37
+ run: pnpm run build
38
+
39
+ - name: Publish to NPM
40
+ run: pnpm -r publish --access public --no-git-checks
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
43
+ NPM_CONFIG_PROVENANCE: true
44
+
45
+ - name: Sync Npmmirror
46
+ run: npx syncmirror
@@ -0,0 +1,13 @@
1
+ {
2
+ "recommendations": [
3
+ "antfu.unocss",
4
+ "dbaeumer.vscode-eslint",
5
+ "editorconfig.editorconfig",
6
+ "esbenp.prettier-vscode",
7
+ "formulahendry.auto-complete-tag",
8
+ "formulahendry.auto-close-tag",
9
+ "formulahendry.auto-rename-tag",
10
+ "kisstkondoros.vscode-gutter-preview",
11
+ "mhutchie.git-graph"
12
+ ]
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "configurations": [
4
+ {
5
+ "type": "node",
6
+ "request": "launch",
7
+ "name": "TS debugger",
8
+ "skipFiles": ["<node_internals>/**"],
9
+ "runtimeArgs": ["--loader", "tsx"],
10
+ "program": "${relativeFile}"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "editor.codeActionsOnSave": {
3
+ "source.fixAll.eslint": "explicit",
4
+ "source.organizeImports": "never"
5
+ },
6
+ "eslint.experimental.useFlatConfig": true,
7
+ "editor.formatOnSave": false,
8
+ "eslint.validate": ["json", "jsonc"],
9
+ "prettier.enable": false
10
+ }
@@ -0,0 +1,11 @@
1
+ # Editor configuration, see http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ indent_style = space
8
+ indent_size = 2
9
+ end_of_line = lf
10
+ trim_trailing_whitespace = true
11
+ insert_final_newline = true
@@ -0,0 +1,21 @@
1
+ "*.js" eol=lf
2
+ "*.ts" eol=lf
3
+ "*.jsx" eol=lf
4
+ "*.tsx" eol=lf
5
+ "*.cjs" eol=lf
6
+ "*.cts" eol=lf
7
+ "*.mjs" eol=lf
8
+ "*.mts" eol=lf
9
+ "*.html" eol=lf
10
+ "*.css" eol=lf
11
+ "*.vue" eol=lf
12
+ "*.json" eol=lf
13
+ "*.less" eol=lf
14
+ "*.scss" eol=lf
15
+ "*.sass" eol=lf
16
+ "*.styl" eol=lf
17
+ "*.svelte" eol=lf
18
+ "*.md" eol=lf
19
+ "*.yml" eol=lf
20
+ "*.astro" eol=lf
21
+ "*.mdx" eol=lf
@@ -0,0 +1,30 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ .DS_Store
12
+ dist
13
+ dist-ssr
14
+ coverage
15
+ *.local
16
+
17
+ /cypress/videos/
18
+ /cypress/screenshots/
19
+
20
+ # Editor directories and files
21
+ .vscode/*
22
+ !.vscode/extensions.json
23
+ !.vscode/settings.json
24
+ !.vscode/launch.json
25
+ .idea
26
+ *.suo
27
+ *.ntvs*
28
+ *.njsproj
29
+ *.sln
30
+ *.sw?
@@ -0,0 +1,2 @@
1
+ registry=https://registry.npmmirror.com/
2
+ shamefully-hoist=true
File without changes
@@ -0,0 +1,3 @@
1
+ import { defineConfig } from '@soybeanjs/eslint-config';
2
+
3
+ export default defineConfig();
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "ts-lib-tsup",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.7",
5
+ "private": true,
6
+ "packageManager": "pnpm@8.12.0",
7
+ "sideEffects": false,
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ }
14
+ },
15
+ "main": "dist/index.cjs",
16
+ "module": "dist/index.js",
17
+ "types": "dist/index.d.ts",
18
+ "files": ["dist"],
19
+ "scripts": {
20
+ "build": "tsup",
21
+ "cleanup": "soy cleanup",
22
+ "commit": "soy git-commit",
23
+ "dev": "tsup --watch",
24
+ "lint": "eslint . --fix",
25
+ "prepare": "simple-git-hooks",
26
+ "publish-pkg": "pnpm publish --access public",
27
+ "release": "soy release",
28
+ "typecheck": "tsc --noEmit --skipLibCheck",
29
+ "update-pkg": "soy ncu"
30
+ },
31
+ "dependencies": {
32
+ "cli-progress": "3.12.0",
33
+ "consola": "3.2.3",
34
+ "dayjs": "1.11.10",
35
+ "execa": "8.0.1",
36
+ "kolorist": "1.8.0",
37
+ "ofetch": "1.3.3"
38
+ },
39
+ "devDependencies": {
40
+ "@soybeanjs/cli": "1.0.0-beta.6",
41
+ "@soybeanjs/eslint-config": "1.0.12",
42
+ "@types/cli-progress": "3.11.5",
43
+ "@types/node": "20.10.4",
44
+ "eslint": "8.55.0",
45
+ "lint-staged": "15.2.0",
46
+ "simple-git-hooks": "2.9.0",
47
+ "tsup": "8.0.1",
48
+ "tsx": "4.6.2",
49
+ "typescript": "5.3.3"
50
+ },
51
+ "simple-git-hooks": {
52
+ "commit-msg": "pnpm soy git-commit-verify",
53
+ "pre-commit": "pnpm typecheck && pnpm lint-staged"
54
+ },
55
+ "lint-staged": {
56
+ "*": "eslint --fix"
57
+ }
58
+ }
@@ -0,0 +1,3 @@
1
+ export function fn() {
2
+ return 1;
3
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "jsx": "preserve",
5
+ "lib": ["DOM", "ESNext"],
6
+ "baseUrl": ".",
7
+ "module": "ESNext",
8
+ "moduleResolution": "node",
9
+ "paths": {
10
+ "@/*": ["./src/*"]
11
+ },
12
+ "resolveJsonModule": true,
13
+ "types": ["node"],
14
+ "strict": true,
15
+ "strictNullChecks": true,
16
+ "noUnusedLocals": true,
17
+ "outDir": "./dist",
18
+ "allowSyntheticDefaultImports": true,
19
+ "esModuleInterop": true,
20
+ "forceConsistentCasingInFileNames": true
21
+ },
22
+ "include": ["src/**/*"],
23
+ "exclude": ["node_modules", "dist"]
24
+ }
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from 'tsup';
2
+
3
+ export default defineConfig({
4
+ entry: ['src/index.ts'],
5
+ clean: true,
6
+ dts: true,
7
+ format: ['cjs', 'esm'],
8
+ external: [],
9
+ shims: true,
10
+ sourcemap: false,
11
+ target: 'es6',
12
+ minify: true
13
+ });
@@ -0,0 +1,46 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ release:
10
+ permissions:
11
+ id-token: write
12
+ contents: write
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: Install pnpm
20
+ uses: pnpm/action-setup@v2
21
+
22
+ - name: Set node
23
+ uses: actions/setup-node@v3
24
+ with:
25
+ node-version: lts/*
26
+ cache: pnpm
27
+ registry-url: "https://registry.npmjs.org"
28
+
29
+ - run: npx githublogen
30
+ env:
31
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32
+
33
+ - name: Install Dependencies
34
+ run: pnpm install --no-frozen-lockfile
35
+
36
+ - name: PNPM build
37
+ run: pnpm run build
38
+
39
+ - name: Publish to NPM
40
+ run: pnpm -r publish --access public --no-git-checks
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
43
+ NPM_CONFIG_PROVENANCE: true
44
+
45
+ - name: Sync Npmmirror
46
+ run: npx syncmirror
@@ -0,0 +1,13 @@
1
+ {
2
+ "recommendations": [
3
+ "antfu.unocss",
4
+ "dbaeumer.vscode-eslint",
5
+ "editorconfig.editorconfig",
6
+ "esbenp.prettier-vscode",
7
+ "formulahendry.auto-complete-tag",
8
+ "formulahendry.auto-close-tag",
9
+ "formulahendry.auto-rename-tag",
10
+ "kisstkondoros.vscode-gutter-preview",
11
+ "mhutchie.git-graph"
12
+ ]
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "configurations": [
4
+ {
5
+ "type": "node",
6
+ "request": "launch",
7
+ "name": "TS debugger",
8
+ "skipFiles": ["<node_internals>/**"],
9
+ "runtimeArgs": ["--loader", "tsx"],
10
+ "program": "${relativeFile}"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "editor.codeActionsOnSave": {
3
+ "source.fixAll.eslint": "explicit",
4
+ "source.organizeImports": "never"
5
+ },
6
+ "eslint.experimental.useFlatConfig": true,
7
+ "editor.formatOnSave": false,
8
+ "eslint.validate": ["json", "jsonc"],
9
+ "prettier.enable": false
10
+ }
@@ -0,0 +1,11 @@
1
+ # Editor configuration, see http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ indent_style = space
8
+ indent_size = 2
9
+ end_of_line = lf
10
+ trim_trailing_whitespace = true
11
+ insert_final_newline = true
@@ -0,0 +1,21 @@
1
+ "*.js" eol=lf
2
+ "*.ts" eol=lf
3
+ "*.jsx" eol=lf
4
+ "*.tsx" eol=lf
5
+ "*.cjs" eol=lf
6
+ "*.cts" eol=lf
7
+ "*.mjs" eol=lf
8
+ "*.mts" eol=lf
9
+ "*.html" eol=lf
10
+ "*.css" eol=lf
11
+ "*.vue" eol=lf
12
+ "*.json" eol=lf
13
+ "*.less" eol=lf
14
+ "*.scss" eol=lf
15
+ "*.sass" eol=lf
16
+ "*.styl" eol=lf
17
+ "*.svelte" eol=lf
18
+ "*.md" eol=lf
19
+ "*.yml" eol=lf
20
+ "*.astro" eol=lf
21
+ "*.mdx" eol=lf
@@ -0,0 +1,30 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ .DS_Store
12
+ dist
13
+ dist-ssr
14
+ coverage
15
+ *.local
16
+
17
+ /cypress/videos/
18
+ /cypress/screenshots/
19
+
20
+ # Editor directories and files
21
+ .vscode/*
22
+ !.vscode/extensions.json
23
+ !.vscode/settings.json
24
+ !.vscode/launch.json
25
+ .idea
26
+ *.suo
27
+ *.ntvs*
28
+ *.njsproj
29
+ *.sln
30
+ *.sw?
@@ -0,0 +1,2 @@
1
+ registry=https://registry.npmmirror.com/
2
+ shamefully-hoist=true
File without changes
@@ -0,0 +1,19 @@
1
+ import { URL, fileURLToPath } from 'node:url';
2
+ import { defineBuildConfig } from 'unbuild';
3
+
4
+ export default defineBuildConfig({
5
+ alias: {
6
+ '@': fileURLToPath(new URL('./src', import.meta.url))
7
+ },
8
+ entries: ['src/index'],
9
+ clean: true,
10
+ declaration: true,
11
+ rollup: {
12
+ emitCJS: true,
13
+ inlineDependencies: true,
14
+ esbuild: {
15
+ minify: true
16
+ }
17
+ },
18
+ sourcemap: false
19
+ });
@@ -0,0 +1,3 @@
1
+ import { defineConfig } from '@soybeanjs/eslint-config';
2
+
3
+ export default defineConfig();
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "ts-lib-unbuild",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.7",
5
+ "private": true,
6
+ "packageManager": "pnpm@8.12.0",
7
+ "sideEffects": false,
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.cjs"
13
+ }
14
+ },
15
+ "main": "dist/index.cjs",
16
+ "module": "dist/index.mjs",
17
+ "types": "dist/index.d.ts",
18
+ "files": ["dist"],
19
+ "scripts": {
20
+ "build": "unbuild",
21
+ "cleanup": "soy cleanup",
22
+ "commit": "soy git-commit",
23
+ "lint": "eslint . --fix",
24
+ "prepare": "simple-git-hooks",
25
+ "publish-pkg": "pnpm publish --access public",
26
+ "release": "soy release",
27
+ "typecheck": "tsc --noEmit --skipLibCheck",
28
+ "update-pkg": "soy ncu"
29
+ },
30
+ "dependencies": {
31
+ "cli-progress": "3.12.0",
32
+ "consola": "3.2.3",
33
+ "dayjs": "1.11.10",
34
+ "execa": "8.0.1",
35
+ "kolorist": "1.8.0",
36
+ "ofetch": "1.3.3"
37
+ },
38
+ "devDependencies": {
39
+ "@soybeanjs/cli": "1.0.0-beta.6",
40
+ "@soybeanjs/eslint-config": "1.0.12",
41
+ "@types/cli-progress": "3.11.5",
42
+ "@types/node": "20.10.4",
43
+ "eslint": "8.55.0",
44
+ "lint-staged": "15.2.0",
45
+ "simple-git-hooks": "2.9.0",
46
+ "tsx": "4.6.2",
47
+ "typescript": "5.3.3",
48
+ "unbuild": "2.0.0"
49
+ },
50
+ "simple-git-hooks": {
51
+ "commit-msg": "pnpm soy git-commit-verify",
52
+ "pre-commit": "pnpm typecheck && pnpm lint-staged"
53
+ },
54
+ "lint-staged": {
55
+ "*": "eslint --fix"
56
+ }
57
+ }
@@ -0,0 +1,3 @@
1
+ export function fn() {
2
+ return 1;
3
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "jsx": "preserve",
5
+ "lib": ["DOM", "ESNext"],
6
+ "baseUrl": ".",
7
+ "module": "ESNext",
8
+ "moduleResolution": "node",
9
+ "paths": {
10
+ "@/*": ["./src/*"]
11
+ },
12
+ "resolveJsonModule": true,
13
+ "types": ["node"],
14
+ "strict": true,
15
+ "strictNullChecks": true,
16
+ "noUnusedLocals": true,
17
+ "outDir": "./dist",
18
+ "allowSyntheticDefaultImports": true,
19
+ "esModuleInterop": true,
20
+ "forceConsistentCasingInFileNames": true
21
+ },
22
+ "include": ["src/**/*"],
23
+ "exclude": ["node_modules", "dist"]
24
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "template-vue",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.5",
4
+ "version": "1.0.0-beta.7",
5
5
  "private": true,
6
6
  "packageManager": "pnpm@8.12.0",
7
7
  "scripts": {
@@ -22,7 +22,7 @@
22
22
  "vue-router": "4.2.5"
23
23
  },
24
24
  "devDependencies": {
25
- "@soybeanjs/cli": "1.0.0-beta.5",
25
+ "@soybeanjs/cli": "1.0.0-beta.6",
26
26
  "@soybeanjs/eslint-config": "1.0.12",
27
27
  "@types/node": "20.10.4",
28
28
  "@vitejs/plugin-vue": "4.5.2",