create-rsbuild 0.0.0-next-20240528072128 → 0.0.0-next-20240723074951

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 (51) hide show
  1. package/dist/index.js +644 -89
  2. package/package.json +6 -3
  3. package/template-biome/biome.json +25 -0
  4. package/template-biome/package.json +12 -0
  5. package/template-eslint/common-js/eslint.config.mjs +8 -0
  6. package/template-eslint/common-js/package.json +13 -0
  7. package/template-eslint/common-ts/eslint.config.mjs +10 -0
  8. package/template-eslint/common-ts/package.json +14 -0
  9. package/template-eslint/react-js/eslint.config.mjs +29 -0
  10. package/template-eslint/react-js/package.json +16 -0
  11. package/template-eslint/react-ts/eslint.config.mjs +31 -0
  12. package/template-eslint/react-ts/package.json +17 -0
  13. package/template-eslint/svelte-js/eslint.config.mjs +20 -0
  14. package/template-eslint/svelte-js/package.json +14 -0
  15. package/template-eslint/svelte-ts/eslint.config.mjs +28 -0
  16. package/template-eslint/svelte-ts/package.json +16 -0
  17. package/template-eslint/vue-js/eslint.config.mjs +10 -0
  18. package/template-eslint/vue-js/package.json +14 -0
  19. package/template-eslint/vue-ts/eslint.config.mjs +12 -0
  20. package/template-eslint/vue-ts/package.json +15 -0
  21. package/template-lit-js/package.json +4 -2
  22. package/template-lit-ts/package.json +4 -2
  23. package/template-lit-ts/tsconfig.json +3 -1
  24. package/template-preact-js/package.json +1 -1
  25. package/template-preact-ts/package.json +2 -2
  26. package/template-preact-ts/src/index.tsx +4 -1
  27. package/template-preact-ts/tsconfig.json +2 -0
  28. package/template-prettier/.prettierignore +4 -0
  29. package/template-prettier/.prettierrc +3 -0
  30. package/template-prettier/package.json +11 -0
  31. package/template-react-ts/package.json +2 -2
  32. package/template-react-ts/src/index.tsx +9 -6
  33. package/template-react-ts/tsconfig.json +3 -1
  34. package/template-solid-js/package.json +1 -1
  35. package/template-solid-js/rsbuild.config.mjs +0 -1
  36. package/template-solid-ts/package.json +2 -2
  37. package/template-solid-ts/rsbuild.config.ts +0 -1
  38. package/template-solid-ts/src/index.tsx +4 -1
  39. package/template-solid-ts/tsconfig.json +3 -1
  40. package/template-svelte-js/package.json +1 -1
  41. package/template-svelte-js/src/index.js +0 -3
  42. package/template-svelte-ts/package.json +5 -3
  43. package/template-svelte-ts/src/index.ts +0 -3
  44. package/template-svelte-ts/tsconfig.json +6 -1
  45. package/template-vanilla-ts/package.json +1 -1
  46. package/template-vanilla-ts/tsconfig.json +3 -1
  47. package/template-vue2-ts/package.json +1 -1
  48. package/template-vue2-ts/tsconfig.json +3 -1
  49. package/template-vue3-ts/package.json +1 -1
  50. package/template-vue3-ts/tsconfig.json +3 -1
  51. package/dist/index.d.ts +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsbuild",
3
- "version": "0.0.0-next-20240528072128",
3
+ "version": "0.0.0-next-20240723074951",
4
4
  "description": "Create a new Rsbuild project",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -27,12 +27,15 @@
27
27
  ],
28
28
  "devDependencies": {
29
29
  "@clack/prompts": "^0.7.0",
30
+ "@types/minimist": "^1.2.5",
30
31
  "@types/node": "18.x",
32
+ "deepmerge": "^4.3.1",
33
+ "minimist": "^1.2.8",
31
34
  "rslog": "^1.2.2",
32
- "typescript": "^5.4.2"
35
+ "typescript": "^5.5.2"
33
36
  },
34
37
  "engines": {
35
- "node": ">=16.0.0"
38
+ "node": ">=16.7.0"
36
39
  },
37
40
  "publishConfig": {
38
41
  "access": "public",
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
3
+ "organizeImports": {
4
+ "enabled": true
5
+ },
6
+ "vcs": {
7
+ "enabled": true,
8
+ "clientKind": "git",
9
+ "useIgnoreFile": true
10
+ },
11
+ "formatter": {
12
+ "indentStyle": "space"
13
+ },
14
+ "javascript": {
15
+ "formatter": {
16
+ "quoteStyle": "single"
17
+ }
18
+ },
19
+ "linter": {
20
+ "enabled": true,
21
+ "rules": {
22
+ "recommended": true
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "rsbuild-biome",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "check": "biome check --write",
7
+ "format": "biome format --write"
8
+ },
9
+ "devDependencies": {
10
+ "@biomejs/biome": "^1.8.3"
11
+ }
12
+ }
@@ -0,0 +1,8 @@
1
+ import js from '@eslint/js';
2
+ import globals from 'globals';
3
+
4
+ export default [
5
+ { languageOptions: { globals: globals.browser } },
6
+ js.configs.recommended,
7
+ { ignores: ['dist/'] },
8
+ ];
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "rsbuild-eslint-common-js",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "lint": "eslint ."
7
+ },
8
+ "devDependencies": {
9
+ "@eslint/js": "^9.7.0",
10
+ "eslint": "^9.7.0",
11
+ "globals": "^15.8.0"
12
+ }
13
+ }
@@ -0,0 +1,10 @@
1
+ import js from '@eslint/js';
2
+ import globals from 'globals';
3
+ import ts from 'typescript-eslint';
4
+
5
+ export default [
6
+ { languageOptions: { globals: globals.browser } },
7
+ js.configs.recommended,
8
+ ...ts.configs.recommended,
9
+ { ignores: ['dist/'] },
10
+ ];
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "rsbuild-eslint-common-ts",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "lint": "eslint ."
7
+ },
8
+ "devDependencies": {
9
+ "@eslint/js": "^9.7.0",
10
+ "eslint": "^9.7.0",
11
+ "globals": "^15.8.0",
12
+ "typescript-eslint": "^7.17.0"
13
+ }
14
+ }
@@ -0,0 +1,29 @@
1
+ import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
2
+ import js from '@eslint/js';
3
+ import reactHooks from 'eslint-plugin-react-hooks';
4
+ import reactJsx from 'eslint-plugin-react/configs/jsx-runtime.js';
5
+ import react from 'eslint-plugin-react/configs/recommended.js';
6
+ import globals from 'globals';
7
+
8
+ export default [
9
+ { languageOptions: { globals: globals.browser } },
10
+ js.configs.recommended,
11
+ ...fixupConfigRules([
12
+ {
13
+ ...react,
14
+ settings: {
15
+ react: { version: 'detect' },
16
+ },
17
+ },
18
+ reactJsx,
19
+ ]),
20
+ {
21
+ plugins: {
22
+ 'react-hooks': fixupPluginRules(reactHooks),
23
+ },
24
+ rules: {
25
+ ...reactHooks.configs.recommended.rules,
26
+ },
27
+ },
28
+ { ignores: ['dist/'] },
29
+ ];
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "rsbuild-eslint-react-js",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "lint": "eslint ."
7
+ },
8
+ "devDependencies": {
9
+ "@eslint/compat": "^1.1.1",
10
+ "@eslint/js": "^9.7.0",
11
+ "eslint": "^9.7.0",
12
+ "eslint-plugin-react": "^7.35.0",
13
+ "eslint-plugin-react-hooks": "^4.6.2",
14
+ "globals": "^15.8.0"
15
+ }
16
+ }
@@ -0,0 +1,31 @@
1
+ import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
2
+ import js from '@eslint/js';
3
+ import reactHooks from 'eslint-plugin-react-hooks';
4
+ import reactJsx from 'eslint-plugin-react/configs/jsx-runtime.js';
5
+ import react from 'eslint-plugin-react/configs/recommended.js';
6
+ import globals from 'globals';
7
+ import ts from 'typescript-eslint';
8
+
9
+ export default [
10
+ { languageOptions: { globals: globals.browser } },
11
+ js.configs.recommended,
12
+ ...ts.configs.recommended,
13
+ ...fixupConfigRules([
14
+ {
15
+ ...react,
16
+ settings: {
17
+ react: { version: 'detect' },
18
+ },
19
+ },
20
+ reactJsx,
21
+ ]),
22
+ {
23
+ plugins: {
24
+ 'react-hooks': fixupPluginRules(reactHooks),
25
+ },
26
+ rules: {
27
+ ...reactHooks.configs.recommended.rules,
28
+ },
29
+ },
30
+ { ignores: ['dist/'] },
31
+ ];
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "rsbuild-eslint-react-ts",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "lint": "eslint ."
7
+ },
8
+ "devDependencies": {
9
+ "@eslint/compat": "^1.1.1",
10
+ "@eslint/js": "^9.7.0",
11
+ "eslint": "^9.7.0",
12
+ "eslint-plugin-react": "^7.35.0",
13
+ "eslint-plugin-react-hooks": "^4.6.2",
14
+ "globals": "^15.8.0",
15
+ "typescript-eslint": "^7.17.0"
16
+ }
17
+ }
@@ -0,0 +1,20 @@
1
+ import js from '@eslint/js';
2
+ import svelte from 'eslint-plugin-svelte';
3
+ import globals from 'globals';
4
+
5
+ /** @type {import('eslint').Linter.FlatConfig[]} */
6
+ export default [
7
+ js.configs.recommended,
8
+ ...svelte.configs['flat/recommended'],
9
+ {
10
+ languageOptions: {
11
+ globals: {
12
+ ...globals.browser,
13
+ ...globals.node,
14
+ },
15
+ },
16
+ },
17
+ {
18
+ ignores: ['dist/'],
19
+ },
20
+ ];
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "rsbuild-eslint-svelte-js",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "lint": "eslint ."
7
+ },
8
+ "devDependencies": {
9
+ "@eslint/js": "^9.7.0",
10
+ "eslint": "^9.7.0",
11
+ "eslint-plugin-svelte": "^2.43.0",
12
+ "globals": "^15.8.0"
13
+ }
14
+ }
@@ -0,0 +1,28 @@
1
+ import js from '@eslint/js';
2
+ import svelte from 'eslint-plugin-svelte';
3
+ import globals from 'globals';
4
+ import ts from 'typescript-eslint';
5
+
6
+ /** @type {import('eslint').Linter.FlatConfig[]} */
7
+ export default [
8
+ js.configs.recommended,
9
+ ...ts.configs.recommended,
10
+ ...svelte.configs['flat/recommended'],
11
+ {
12
+ languageOptions: {
13
+ globals: {
14
+ ...globals.browser,
15
+ ...globals.node,
16
+ },
17
+ },
18
+ },
19
+ {
20
+ files: ['**/*.svelte'],
21
+ languageOptions: {
22
+ parserOptions: {
23
+ parser: ts.parser,
24
+ },
25
+ },
26
+ },
27
+ { ignores: ['dist/'] },
28
+ ];
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "rsbuild-eslint-svelte-ts",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "lint": "eslint ."
7
+ },
8
+ "devDependencies": {
9
+ "@eslint/js": "^9.7.0",
10
+ "eslint": "^9.7.0",
11
+ "eslint-plugin-svelte": "^2.43.0",
12
+ "globals": "^15.8.0",
13
+ "typescript-eslint": "^8.0.0-alpha.48"
14
+ },
15
+ "type": "module"
16
+ }
@@ -0,0 +1,10 @@
1
+ import js from '@eslint/js';
2
+ import vue from 'eslint-plugin-vue';
3
+ import globals from 'globals';
4
+
5
+ export default [
6
+ { languageOptions: { globals: globals.browser } },
7
+ js.configs.recommended,
8
+ ...vue.configs['flat/essential'],
9
+ { ignores: ['dist/'] },
10
+ ];
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "rsbuild-eslint-vue-js",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "lint": "eslint ."
7
+ },
8
+ "devDependencies": {
9
+ "@eslint/js": "^9.7.0",
10
+ "eslint": "^9.7.0",
11
+ "eslint-plugin-vue": "^9.27.0",
12
+ "globals": "^15.8.0"
13
+ }
14
+ }
@@ -0,0 +1,12 @@
1
+ import js from '@eslint/js';
2
+ import vue from 'eslint-plugin-vue';
3
+ import globals from 'globals';
4
+ import ts from 'typescript-eslint';
5
+
6
+ export default [
7
+ { languageOptions: { globals: globals.browser } },
8
+ js.configs.recommended,
9
+ ...ts.configs.recommended,
10
+ ...vue.configs['flat/essential'],
11
+ { ignores: ['dist/'] },
12
+ ];
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "rsbuild-eslint-vue-ts",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "lint": "eslint ."
7
+ },
8
+ "devDependencies": {
9
+ "@eslint/js": "^9.7.0",
10
+ "eslint": "^9.7.0",
11
+ "eslint-plugin-vue": "^9.27.0",
12
+ "globals": "^15.8.0",
13
+ "typescript-eslint": "^7.17.0"
14
+ }
15
+ }
@@ -7,8 +7,10 @@
7
7
  "build": "rsbuild build",
8
8
  "preview": "rsbuild preview"
9
9
  },
10
+ "dependencies": {
11
+ "lit": "^3.1.4"
12
+ },
10
13
  "devDependencies": {
11
- "@rsbuild/core": "workspace:*",
12
- "lit": "^3.1.3"
14
+ "@rsbuild/core": "workspace:*"
13
15
  }
14
16
  }
@@ -7,9 +7,11 @@
7
7
  "build": "rsbuild build",
8
8
  "preview": "rsbuild preview"
9
9
  },
10
+ "dependencies": {
11
+ "lit": "^3.1.4"
12
+ },
10
13
  "devDependencies": {
11
14
  "@rsbuild/core": "workspace:*",
12
- "lit": "^3.1.3",
13
- "typescript": "^5.4.2"
15
+ "typescript": "^5.5.2"
14
16
  }
15
17
  }
@@ -3,12 +3,14 @@
3
3
  "target": "ES2020",
4
4
  "lib": ["DOM", "ES2020"],
5
5
  "module": "ESNext",
6
+ "noEmit": true,
6
7
  "strict": true,
7
8
  "skipLibCheck": true,
8
9
  "isolatedModules": true,
9
10
  "resolveJsonModule": true,
10
11
  "moduleResolution": "bundler",
11
- "useDefineForClassFields": true
12
+ "useDefineForClassFields": true,
13
+ "allowImportingTsExtensions": true
12
14
  },
13
15
  "include": ["src"]
14
16
  }
@@ -8,7 +8,7 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "preact": "^10.22.0"
11
+ "preact": "^10.22.1"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
@@ -8,11 +8,11 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "preact": "^10.22.0"
11
+ "preact": "^10.22.1"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-preact": "workspace:*",
16
- "typescript": "^5.4.2"
16
+ "typescript": "^5.5.2"
17
17
  }
18
18
  }
@@ -1,4 +1,7 @@
1
1
  import { render } from 'preact';
2
2
  import App from './App';
3
3
 
4
- render(<App />, document.getElementById('root')!);
4
+ const root = document.getElementById('root');
5
+ if (root) {
6
+ render(<App />, root);
7
+ }
@@ -5,12 +5,14 @@
5
5
  "module": "ESNext",
6
6
  "jsx": "react-jsx",
7
7
  "jsxImportSource": "preact",
8
+ "noEmit": true,
8
9
  "strict": true,
9
10
  "skipLibCheck": true,
10
11
  "isolatedModules": true,
11
12
  "resolveJsonModule": true,
12
13
  "moduleResolution": "bundler",
13
14
  "useDefineForClassFields": true,
15
+ "allowImportingTsExtensions": true,
14
16
  "paths": {
15
17
  "react": ["./node_modules/preact/compat/"],
16
18
  "react-dom": ["./node_modules/preact/compat/"]
@@ -0,0 +1,4 @@
1
+ # Lock files
2
+ package-lock.json
3
+ pnpm-lock.yaml
4
+ yarn.lock
@@ -0,0 +1,3 @@
1
+ {
2
+ "singleQuote": true
3
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "rsbuild-prettier",
3
+ "private": true,
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "format": "prettier --write ."
7
+ },
8
+ "devDependencies": {
9
+ "prettier": "^3.3.3"
10
+ }
11
+ }
@@ -14,8 +14,8 @@
14
14
  "devDependencies": {
15
15
  "@rsbuild/core": "workspace:*",
16
16
  "@rsbuild/plugin-react": "workspace:*",
17
- "@types/react": "^18.3.2",
17
+ "@types/react": "^18.3.3",
18
18
  "@types/react-dom": "^18.3.0",
19
- "typescript": "^5.4.2"
19
+ "typescript": "^5.5.2"
20
20
  }
21
21
  }
@@ -2,9 +2,12 @@ import React from 'react';
2
2
  import ReactDOM from 'react-dom/client';
3
3
  import App from './App';
4
4
 
5
- const root = ReactDOM.createRoot(document.getElementById('root')!);
6
- root.render(
7
- <React.StrictMode>
8
- <App />
9
- </React.StrictMode>,
10
- );
5
+ const rootEl = document.getElementById('root');
6
+ if (rootEl) {
7
+ const root = ReactDOM.createRoot(rootEl);
8
+ root.render(
9
+ <React.StrictMode>
10
+ <App />
11
+ </React.StrictMode>,
12
+ );
13
+ }
@@ -4,12 +4,14 @@
4
4
  "lib": ["DOM", "ES2020"],
5
5
  "module": "ESNext",
6
6
  "jsx": "react-jsx",
7
+ "noEmit": true,
7
8
  "strict": true,
8
9
  "skipLibCheck": true,
9
10
  "isolatedModules": true,
10
11
  "resolveJsonModule": true,
11
12
  "moduleResolution": "bundler",
12
- "useDefineForClassFields": true
13
+ "useDefineForClassFields": true,
14
+ "allowImportingTsExtensions": true
13
15
  },
14
16
  "include": ["src"]
15
17
  }
@@ -8,7 +8,7 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "solid-js": "^1.8.17"
11
+ "solid-js": "^1.8.18"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
@@ -6,7 +6,6 @@ export default defineConfig({
6
6
  plugins: [
7
7
  pluginBabel({
8
8
  include: /\.(?:jsx|tsx)$/,
9
- exclude: /[\\/]node_modules[\\/]/,
10
9
  }),
11
10
  pluginSolid(),
12
11
  ],
@@ -8,12 +8,12 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "solid-js": "^1.8.17"
11
+ "solid-js": "^1.8.18"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
15
15
  "@rsbuild/plugin-babel": "workspace:*",
16
16
  "@rsbuild/plugin-solid": "workspace:*",
17
- "typescript": "^5.4.2"
17
+ "typescript": "^5.5.2"
18
18
  }
19
19
  }
@@ -6,7 +6,6 @@ export default defineConfig({
6
6
  plugins: [
7
7
  pluginBabel({
8
8
  include: /\.(?:jsx|tsx)$/,
9
- exclude: /[\\/]node_modules[\\/]/,
10
9
  }),
11
10
  pluginSolid(),
12
11
  ],
@@ -1,4 +1,7 @@
1
1
  import { render } from 'solid-js/web';
2
2
  import App from './App';
3
3
 
4
- render(() => <App />, document.getElementById('root')!);
4
+ const root = document.getElementById('root');
5
+ if (root) {
6
+ render(() => <App />, root);
7
+ }
@@ -5,12 +5,14 @@
5
5
  "module": "ESNext",
6
6
  "jsx": "preserve",
7
7
  "jsxImportSource": "solid-js",
8
+ "noEmit": true,
8
9
  "strict": true,
9
10
  "skipLibCheck": true,
10
11
  "isolatedModules": true,
11
12
  "resolveJsonModule": true,
12
13
  "moduleResolution": "bundler",
13
- "useDefineForClassFields": true
14
+ "useDefineForClassFields": true,
15
+ "allowImportingTsExtensions": true
14
16
  },
15
17
  "include": ["src"]
16
18
  }
@@ -8,7 +8,7 @@
8
8
  "preview": "rsbuild preview"
9
9
  },
10
10
  "dependencies": {
11
- "svelte": "^4.2.16"
11
+ "svelte": "^4.2.18"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rsbuild/core": "workspace:*",
@@ -3,9 +3,6 @@ import './index.css';
3
3
 
4
4
  const app = new App({
5
5
  target: document.body,
6
- props: {
7
- name: 'world',
8
- },
9
6
  });
10
7
 
11
8
  export default app;
@@ -5,14 +5,16 @@
5
5
  "scripts": {
6
6
  "dev": "rsbuild dev --open",
7
7
  "build": "rsbuild build",
8
- "preview": "rsbuild preview"
8
+ "preview": "rsbuild preview",
9
+ "svelte-check": "svelte-check --tsconfig ./tsconfig.json"
9
10
  },
10
11
  "dependencies": {
11
- "svelte": "^4.2.16"
12
+ "svelte": "^4.2.18"
12
13
  },
13
14
  "devDependencies": {
14
15
  "@rsbuild/core": "workspace:*",
15
16
  "@rsbuild/plugin-svelte": "workspace:*",
16
- "typescript": "^5.4.2"
17
+ "svelte-check": "^3.8.4",
18
+ "typescript": "^5.5.2"
17
19
  }
18
20
  }
@@ -3,9 +3,6 @@ import './index.css';
3
3
 
4
4
  const app = new App({
5
5
  target: document.body,
6
- props: {
7
- name: 'world',
8
- },
9
6
  });
10
7
 
11
8
  export default app;