create-rstack 3.2.0 → 3.2.2

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 (82) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/template-app-lit/package.json +1 -1
  4. package/template-app-lit/rstack.config.js +8 -10
  5. package/template-app-lit-ts/package.json +1 -1
  6. package/template-app-lit-ts/rstack.config.ts +9 -10
  7. package/template-app-lit-ts/tests/tsconfig.json +7 -0
  8. package/template-app-preact/package.json +2 -2
  9. package/template-app-preact/rstack.config.js +10 -11
  10. package/template-app-preact-ts/package.json +2 -2
  11. package/template-app-preact-ts/rstack.config.ts +11 -12
  12. package/template-app-react/package.json +2 -2
  13. package/template-app-react/rstack.config.js +10 -11
  14. package/template-app-react-ts/package.json +2 -2
  15. package/template-app-react-ts/rstack.config.ts +11 -12
  16. package/template-app-solid/package.json +4 -4
  17. package/template-app-solid/rstack.config.js +8 -7
  18. package/template-app-solid-ts/package.json +4 -4
  19. package/template-app-solid-ts/rstack.config.ts +9 -7
  20. package/template-app-svelte/package.json +3 -3
  21. package/template-app-svelte/rstack.config.js +8 -7
  22. package/template-app-svelte-ts/package.json +4 -4
  23. package/template-app-svelte-ts/rstack.config.ts +9 -7
  24. package/template-app-svelte-ts/tests/tsconfig.json +1 -1
  25. package/template-app-vanilla/package.json +2 -2
  26. package/template-app-vanilla/rstack.config.js +8 -6
  27. package/template-app-vanilla/tests/dom.test.js +1 -1
  28. package/template-app-vanilla-ts/package.json +2 -2
  29. package/template-app-vanilla-ts/rstack.config.ts +9 -6
  30. package/template-app-vanilla-ts/tests/dom.test.ts +1 -1
  31. package/template-app-vue/package.json +2 -2
  32. package/template-app-vue/rstack.config.js +8 -7
  33. package/template-app-vue-ts/package.json +3 -3
  34. package/template-app-vue-ts/rstack.config.ts +9 -7
  35. package/template-common/README.md +2 -2
  36. package/template-doc/README.md +1 -1
  37. package/template-doc/package.json +1 -1
  38. package/template-doc/rstack.config.ts +7 -11
  39. package/template-doc-i18n/README.md +1 -1
  40. package/template-doc-i18n/package.json +1 -1
  41. package/template-doc-i18n/rstack.config.ts +7 -11
  42. package/template-lib-node/README.md +1 -1
  43. package/template-lib-node/package.json +2 -6
  44. package/template-lib-node/rstack.config.js +9 -13
  45. package/template-lib-node-ts/README.md +1 -1
  46. package/template-lib-node-ts/package.json +1 -1
  47. package/template-lib-node-ts/rstack.config.ts +9 -11
  48. package/template-lib-node-ts/tests/tsconfig.json +8 -0
  49. package/template-lib-react/README.md +1 -1
  50. package/template-lib-react/package.json +3 -7
  51. package/template-lib-react/rstack.config.js +10 -16
  52. package/template-lib-react-ts/README.md +1 -1
  53. package/template-lib-react-ts/package.json +2 -2
  54. package/template-lib-react-ts/rstack.config.ts +11 -17
  55. package/template-lib-react-ts/tests/tsconfig.json +1 -1
  56. package/template-lib-react-ts/tsconfig.json +1 -1
  57. package/template-lib-solid/README.md +1 -1
  58. package/template-lib-solid/package.json +4 -4
  59. package/template-lib-solid/rstack.config.js +9 -15
  60. package/template-lib-solid-ts/README.md +1 -1
  61. package/template-lib-solid-ts/package.json +5 -5
  62. package/template-lib-solid-ts/rstack.config.ts +10 -15
  63. package/template-lib-solid-ts/tests/tsconfig.json +1 -1
  64. package/template-lib-solid-ts/tsconfig.json +1 -1
  65. package/template-lib-svelte/README.md +1 -1
  66. package/template-lib-svelte/package.json +4 -5
  67. package/template-lib-svelte/rstack.config.js +8 -17
  68. package/template-lib-svelte-ts/README.md +1 -1
  69. package/template-lib-svelte-ts/package.json +6 -5
  70. package/template-lib-svelte-ts/rstack.config.ts +9 -17
  71. package/template-lib-svelte-ts/tests/tsconfig.json +3 -1
  72. package/template-lib-svelte-ts/tsconfig.json +4 -4
  73. package/template-lib-vue/README.md +1 -1
  74. package/template-lib-vue/package.json +3 -7
  75. package/template-lib-vue/rstack.config.js +8 -12
  76. package/template-lib-vue/tests/index.test.js +3 -2
  77. package/template-lib-vue-ts/README.md +1 -1
  78. package/template-lib-vue-ts/package.json +3 -3
  79. package/template-lib-vue-ts/rstack.config.ts +9 -12
  80. package/template-lib-vue-ts/tests/index.test.ts +3 -2
  81. package/template-lib-vue-ts/tests/tsconfig.json +2 -1
  82. package/template-lib-vue-ts/tsconfig.json +1 -1
@@ -1,15 +1,13 @@
1
- // Rstack configuration guide: https://rstack.rs/config
1
+ // Configuration guide: https://rstack.rs/config
2
2
  import { define } from 'rstack';
3
3
 
4
4
  define.lib(async () => {
5
5
  const { pluginBabel } = await import('@rsbuild/plugin-babel');
6
6
  const { pluginSolid } = await import('@rsbuild/plugin-solid');
7
-
8
7
  return {
9
8
  lib: [
10
9
  {
11
10
  id: 'compiled',
12
- bundle: false,
13
11
  dts: true,
14
12
  plugins: [
15
13
  pluginBabel({
@@ -20,7 +18,6 @@ define.lib(async () => {
20
18
  },
21
19
  {
22
20
  id: 'source',
23
- bundle: false,
24
21
  output: {
25
22
  filename: {
26
23
  js: '[name].jsx',
@@ -49,11 +46,7 @@ define.lib(async () => {
49
46
  },
50
47
  },
51
48
  ],
52
- source: {
53
- entry: {
54
- index: ['./src/**'],
55
- },
56
- },
49
+ bundle: false,
57
50
  output: {
58
51
  target: 'web',
59
52
  },
@@ -63,7 +56,6 @@ define.lib(async () => {
63
56
  define.test(async () => {
64
57
  const { pluginBabel } = await import('@rsbuild/plugin-babel');
65
58
  const { pluginSolid } = await import('@rsbuild/plugin-solid');
66
-
67
59
  return {
68
60
  setupFiles: ['./tests/rstest.setup.ts'],
69
61
  plugins: [
@@ -75,11 +67,14 @@ define.test(async () => {
75
67
  };
76
68
  });
77
69
 
78
- define.lint(async () => {
79
- const { js, ts } = await import('rstack/lint');
80
-
81
- return [js.configs.recommended, ts.configs.recommendedTypeChecked];
82
- });
70
+ define.lint(({ js, ts, rstestPlugin }) => [
71
+ js.configs.recommended,
72
+ ts.configs.recommendedTypeChecked,
73
+ {
74
+ files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
75
+ ...rstestPlugin.configs.recommended,
76
+ },
77
+ ]);
83
78
 
84
79
  define.fmt({
85
80
  singleQuote: true,
@@ -2,7 +2,7 @@
2
2
  "extends": "../tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "rootDir": "..",
5
- "types": ["@testing-library/jest-dom"]
5
+ "types": ["rstack/types", "node", "@testing-library/jest-dom"]
6
6
  },
7
7
  "include": ["./"]
8
8
  }
@@ -6,7 +6,7 @@
6
6
  "target": "ES2022",
7
7
  "noEmit": true,
8
8
  "skipLibCheck": true,
9
- "types": ["rstack/types", "node"],
9
+ "types": ["rstack/types"],
10
10
  "useDefineForClassFields": true,
11
11
  "rootDir": "src",
12
12
 
@@ -20,5 +20,5 @@ Install the dependencies:
20
20
 
21
21
  ## Learn more
22
22
 
23
- - [Rstack documentation](https://rstack.rs)
23
+ - [Rstack CLI documentation](https://rstack.rs)
24
24
  - [Rslib documentation](https://rslib.rs)
@@ -3,9 +3,8 @@
3
3
  "version": "0.0.0",
4
4
  "type": "module",
5
5
  "exports": {
6
- ".": {
7
- "default": "./dist/index.js"
8
- }
6
+ ".": "./dist/index.js",
7
+ "./style.css": "./dist/index.css"
9
8
  },
10
9
  "files": [
11
10
  "dist",
@@ -24,8 +23,8 @@
24
23
  "@rsbuild/plugin-svelte": "^2.0.1",
25
24
  "happy-dom": "^20.11.2",
26
25
  "prettier-plugin-svelte": "^4.1.1",
27
- "rstack": "^0.6.0",
28
- "svelte": "^5.56.8"
26
+ "rstack": "^0.6.2",
27
+ "svelte": "^5.56.9"
29
28
  },
30
29
  "peerDependencies": {
31
30
  "svelte": "^5.0.0"
@@ -1,17 +1,10 @@
1
1
  // @ts-check
2
- // Rstack configuration guide: https://rstack.rs/config
2
+ // Configuration guide: https://rstack.rs/config
3
3
  import { define } from 'rstack';
4
4
 
5
5
  define.lib(async () => {
6
6
  const { pluginSvelte } = await import('@rsbuild/plugin-svelte');
7
-
8
7
  return {
9
- bundle: false,
10
- source: {
11
- entry: {
12
- index: ['./src/**'],
13
- },
14
- },
15
8
  output: {
16
9
  target: 'web',
17
10
  },
@@ -19,15 +12,13 @@ define.lib(async () => {
19
12
  };
20
13
  });
21
14
 
22
- define.test({
23
- testEnvironment: 'happy-dom',
24
- });
25
-
26
- define.lint(async () => {
27
- const { js } = await import('rstack/lint');
28
-
29
- return [js.configs.recommended];
30
- });
15
+ define.lint(({ js, rstestPlugin }) => [
16
+ js.configs.recommended,
17
+ {
18
+ files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
19
+ ...rstestPlugin.configs.recommended,
20
+ },
21
+ ]);
31
22
 
32
23
  define.fmt({
33
24
  plugins: ['prettier-plugin-svelte'],
@@ -20,5 +20,5 @@ Install the dependencies:
20
20
 
21
21
  ## Learn more
22
22
 
23
- - [Rstack documentation](https://rstack.rs)
23
+ - [Rstack CLI documentation](https://rstack.rs)
24
24
  - [Rslib documentation](https://rslib.rs)
@@ -6,7 +6,8 @@
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
8
8
  "default": "./dist/index.js"
9
- }
9
+ },
10
+ "./style.css": "./dist/index.css"
10
11
  },
11
12
  "types": "./dist/index.d.ts",
12
13
  "files": [
@@ -27,10 +28,10 @@
27
28
  "@types/node": "^24.13.3",
28
29
  "happy-dom": "^20.11.2",
29
30
  "prettier-plugin-svelte": "^4.1.1",
30
- "rstack": "^0.6.0",
31
- "svelte": "^5.56.8",
32
- "svelte-check": "^4.7.5",
33
- "svelte2tsx": "^0.7.59",
31
+ "rstack": "^0.6.2",
32
+ "svelte": "^5.56.9",
33
+ "svelte-check": "^4.7.6",
34
+ "svelte2tsx": "^0.7.61",
34
35
  "typescript": "^6.0.3"
35
36
  },
36
37
  "peerDependencies": {
@@ -1,17 +1,10 @@
1
- // Rstack configuration guide: https://rstack.rs/config
1
+ // Configuration guide: https://rstack.rs/config
2
2
  import { define } from 'rstack';
3
3
  import { svelteDtsPlugin } from './scripts/rslib-plugin-svelte-dts.ts';
4
4
 
5
5
  define.lib(async () => {
6
6
  const { pluginSvelte } = await import('@rsbuild/plugin-svelte');
7
-
8
7
  return {
9
- bundle: false,
10
- source: {
11
- entry: {
12
- index: ['./src/**'],
13
- },
14
- },
15
8
  output: {
16
9
  target: 'web',
17
10
  },
@@ -19,15 +12,14 @@ define.lib(async () => {
19
12
  };
20
13
  });
21
14
 
22
- define.test({
23
- testEnvironment: 'happy-dom',
24
- });
25
-
26
- define.lint(async () => {
27
- const { js, ts } = await import('rstack/lint');
28
-
29
- return [js.configs.recommended, ts.configs.recommendedTypeChecked];
30
- });
15
+ define.lint(({ js, ts, rstestPlugin }) => [
16
+ js.configs.recommended,
17
+ ts.configs.recommendedTypeChecked,
18
+ {
19
+ files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
20
+ ...rstestPlugin.configs.recommended,
21
+ },
22
+ ]);
31
23
 
32
24
  define.fmt({
33
25
  plugins: ['prettier-plugin-svelte'],
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "extends": "../tsconfig.json",
3
3
  "compilerOptions": {
4
- "rootDir": ".."
4
+ "noEmit": true,
5
+ "rootDir": "..",
6
+ "types": ["rstack/types", "node", "svelte"]
5
7
  },
6
8
  "include": ["./"]
7
9
  }
@@ -4,13 +4,13 @@
4
4
  "target": "ES2022",
5
5
  "declaration": true,
6
6
  "emitDeclarationOnly": true,
7
- "isolatedModules": true,
7
+ "outDir": "dist",
8
8
  "skipLibCheck": true,
9
- "types": ["rstack/types", "node", "svelte"],
9
+ "types": ["rstack/types", "svelte"],
10
10
  "useDefineForClassFields": true,
11
+ "rootDir": "src",
11
12
 
12
13
  /* modules */
13
- "module": "preserve",
14
14
  "moduleDetection": "force",
15
15
  "moduleResolution": "bundler",
16
16
  "verbatimModuleSyntax": true,
@@ -21,5 +21,5 @@
21
21
  "noUnusedLocals": true,
22
22
  "noUnusedParameters": true
23
23
  },
24
- "include": ["src", "scripts", "*.config.ts"]
24
+ "include": ["src"]
25
25
  }
@@ -20,5 +20,5 @@ Install the dependencies:
20
20
 
21
21
  ## Learn more
22
22
 
23
- - [Rstack documentation](https://rstack.rs)
23
+ - [Rstack CLI documentation](https://rstack.rs)
24
24
  - [Rslib documentation](https://rslib.rs)
@@ -2,11 +2,7 @@
2
2
  "name": "rstack-lib-vue",
3
3
  "version": "0.0.0",
4
4
  "type": "module",
5
- "exports": {
6
- ".": {
7
- "default": "./dist/index.js"
8
- }
9
- },
5
+ "exports": "./dist/index.js",
10
6
  "files": [
11
7
  "dist",
12
8
  "README.md"
@@ -22,10 +18,10 @@
22
18
  },
23
19
  "devDependencies": {
24
20
  "@rsbuild/plugin-vue": "^2.0.1",
25
- "@testing-library/jest-dom": "^7.0.0",
21
+ "@testing-library/jest-dom": "^7.0.1",
26
22
  "@vue/test-utils": "^2.4.11",
27
23
  "happy-dom": "^20.11.2",
28
- "rstack": "^0.6.0",
24
+ "rstack": "^0.6.2",
29
25
  "vue": "^3.5.41"
30
26
  },
31
27
  "peerDependencies": {
@@ -1,17 +1,11 @@
1
1
  // @ts-check
2
- // Rstack configuration guide: https://rstack.rs/config
2
+ // Configuration guide: https://rstack.rs/config
3
3
  import { define } from 'rstack';
4
4
 
5
5
  define.lib(async () => {
6
6
  const { pluginVue } = await import('@rsbuild/plugin-vue');
7
-
8
7
  return {
9
8
  bundle: false,
10
- source: {
11
- entry: {
12
- index: ['./src/**'],
13
- },
14
- },
15
9
  output: {
16
10
  target: 'web',
17
11
  },
@@ -23,11 +17,13 @@ define.test({
23
17
  setupFiles: ['./tests/rstest.setup.js'],
24
18
  });
25
19
 
26
- define.lint(async () => {
27
- const { js } = await import('rstack/lint');
28
-
29
- return [js.configs.recommended];
30
- });
20
+ define.lint(({ js, rstestPlugin }) => [
21
+ js.configs.recommended,
22
+ {
23
+ files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
24
+ ...rstestPlugin.configs.recommended,
25
+ },
26
+ ]);
31
27
 
32
28
  define.fmt({
33
29
  singleQuote: true,
@@ -10,8 +10,9 @@ test('The button should have correct background color', () => {
10
10
  label: 'Demo Button',
11
11
  },
12
12
  });
13
- expect(wrapper.get('button').element).toHaveStyle({
13
+ const button = wrapper.get('button');
14
+ expect(button.text()).toBe('Demo Button');
15
+ expect(button.element).toHaveStyle({
14
16
  backgroundColor: '#ccc',
15
17
  });
16
- wrapper.unmount();
17
18
  });
@@ -20,5 +20,5 @@ Install the dependencies:
20
20
 
21
21
  ## Learn more
22
22
 
23
- - [Rstack documentation](https://rstack.rs)
23
+ - [Rstack CLI documentation](https://rstack.rs)
24
24
  - [Rslib documentation](https://rslib.rs)
@@ -24,14 +24,14 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@rsbuild/plugin-vue": "^2.0.1",
27
- "@testing-library/jest-dom": "^7.0.0",
27
+ "@testing-library/jest-dom": "^7.0.1",
28
28
  "@types/node": "^24.13.3",
29
29
  "@vue/test-utils": "^2.4.11",
30
30
  "happy-dom": "^20.11.2",
31
- "rstack": "^0.6.0",
31
+ "rstack": "^0.6.2",
32
32
  "typescript": "^6.0.3",
33
33
  "vue": "^3.5.41",
34
- "vue-tsc": "^3.3.9"
34
+ "vue-tsc": "^3.3.10"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "vue": ">=3.2.0"
@@ -1,16 +1,10 @@
1
- // Rstack configuration guide: https://rstack.rs/config
1
+ // Configuration guide: https://rstack.rs/config
2
2
  import { define } from 'rstack';
3
3
 
4
4
  define.lib(async () => {
5
5
  const { pluginVue } = await import('@rsbuild/plugin-vue');
6
-
7
6
  return {
8
7
  bundle: false,
9
- source: {
10
- entry: {
11
- index: ['./src/**'],
12
- },
13
- },
14
8
  output: {
15
9
  target: 'web',
16
10
  },
@@ -22,11 +16,14 @@ define.test({
22
16
  setupFiles: ['./tests/rstest.setup.ts'],
23
17
  });
24
18
 
25
- define.lint(async () => {
26
- const { js, ts } = await import('rstack/lint');
27
-
28
- return [js.configs.recommended, ts.configs.recommendedTypeChecked];
29
- });
19
+ define.lint(({ js, ts, rstestPlugin }) => [
20
+ js.configs.recommended,
21
+ ts.configs.recommendedTypeChecked,
22
+ {
23
+ files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
24
+ ...rstestPlugin.configs.recommended,
25
+ },
26
+ ]);
30
27
 
31
28
  define.fmt({
32
29
  singleQuote: true,
@@ -10,8 +10,9 @@ test('The button should have correct background color', () => {
10
10
  label: 'Demo Button',
11
11
  },
12
12
  });
13
- expect(wrapper.get('button').element).toHaveStyle({
13
+ const button = wrapper.get('button');
14
+ expect(button.text()).toBe('Demo Button');
15
+ expect(button.element).toHaveStyle({
14
16
  backgroundColor: '#ccc',
15
17
  });
16
- wrapper.unmount();
17
18
  });
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "extends": "../tsconfig.json",
3
3
  "compilerOptions": {
4
+ "noEmit": true,
4
5
  "rootDir": "..",
5
- "types": ["@testing-library/jest-dom"]
6
+ "types": ["rstack/types", "node", "@testing-library/jest-dom"]
6
7
  },
7
8
  "include": ["./"]
8
9
  }
@@ -7,7 +7,7 @@
7
7
  "emitDeclarationOnly": true,
8
8
  "outDir": "dist",
9
9
  "skipLibCheck": true,
10
- "types": ["rstack/types", "node"],
10
+ "types": ["rstack/types"],
11
11
  "jsxImportSource": "vue",
12
12
  "useDefineForClassFields": true,
13
13
  "rootDir": "src",