create-rstack 3.2.1 → 3.2.3

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 (68) hide show
  1. package/package.json +2 -2
  2. package/template-app-lit/package.json +1 -1
  3. package/template-app-lit/rstack.config.js +8 -6
  4. package/template-app-lit-ts/package.json +1 -1
  5. package/template-app-lit-ts/rstack.config.ts +6 -6
  6. package/template-app-lit-ts/tests/tsconfig.json +7 -0
  7. package/template-app-preact/package.json +1 -1
  8. package/template-app-preact/rstack.config.js +6 -3
  9. package/template-app-preact-ts/package.json +1 -1
  10. package/template-app-preact-ts/rstack.config.ts +6 -3
  11. package/template-app-react/package.json +1 -1
  12. package/template-app-react/rstack.config.js +6 -3
  13. package/template-app-react-ts/package.json +1 -1
  14. package/template-app-react-ts/rstack.config.ts +6 -3
  15. package/template-app-solid/package.json +3 -3
  16. package/template-app-solid/rstack.config.js +8 -3
  17. package/template-app-solid-ts/package.json +3 -3
  18. package/template-app-solid-ts/rstack.config.ts +6 -3
  19. package/template-app-svelte/package.json +2 -2
  20. package/template-app-svelte/rstack.config.js +8 -3
  21. package/template-app-svelte-ts/package.json +3 -3
  22. package/template-app-svelte-ts/rstack.config.ts +6 -3
  23. package/template-app-svelte-ts/tests/tsconfig.json +1 -1
  24. package/template-app-vanilla/package.json +1 -1
  25. package/template-app-vanilla/rstack.config.js +8 -2
  26. package/template-app-vanilla/tests/dom.test.js +1 -1
  27. package/template-app-vanilla-ts/package.json +1 -1
  28. package/template-app-vanilla-ts/rstack.config.ts +6 -2
  29. package/template-app-vanilla-ts/tests/dom.test.ts +1 -1
  30. package/template-app-vue/package.json +1 -1
  31. package/template-app-vue/rstack.config.js +8 -3
  32. package/template-app-vue-ts/package.json +2 -2
  33. package/template-app-vue-ts/rstack.config.ts +6 -3
  34. package/template-doc/package.json +1 -1
  35. package/template-doc/rstack.config.ts +1 -1
  36. package/template-doc-i18n/package.json +1 -1
  37. package/template-doc-i18n/rstack.config.ts +1 -1
  38. package/template-lib-node/package.json +2 -6
  39. package/template-lib-node/rstack.config.js +9 -9
  40. package/template-lib-node-ts/package.json +1 -1
  41. package/template-lib-node-ts/rstack.config.ts +6 -7
  42. package/template-lib-node-ts/tests/tsconfig.json +8 -0
  43. package/template-lib-react/package.json +2 -6
  44. package/template-lib-react/rstack.config.js +6 -8
  45. package/template-lib-react-ts/package.json +1 -1
  46. package/template-lib-react-ts/rstack.config.ts +6 -8
  47. package/template-lib-react-ts/tests/tsconfig.json +1 -1
  48. package/template-lib-react-ts/tsconfig.json +1 -1
  49. package/template-lib-solid/package.json +3 -3
  50. package/template-lib-solid/rstack.config.js +9 -11
  51. package/template-lib-solid-ts/package.json +4 -4
  52. package/template-lib-solid-ts/rstack.config.ts +7 -11
  53. package/template-lib-solid-ts/tests/tsconfig.json +1 -1
  54. package/template-lib-solid-ts/tsconfig.json +1 -1
  55. package/template-lib-svelte/package.json +3 -7
  56. package/template-lib-svelte/rstack.config.js +8 -12
  57. package/template-lib-svelte-ts/package.json +4 -4
  58. package/template-lib-svelte-ts/rstack.config.ts +6 -12
  59. package/template-lib-svelte-ts/tests/tsconfig.json +3 -1
  60. package/template-lib-svelte-ts/tsconfig.json +4 -4
  61. package/template-lib-vue/package.json +2 -6
  62. package/template-lib-vue/rstack.config.js +8 -8
  63. package/template-lib-vue/tests/index.test.js +3 -2
  64. package/template-lib-vue-ts/package.json +2 -2
  65. package/template-lib-vue-ts/rstack.config.ts +6 -8
  66. package/template-lib-vue-ts/tests/index.test.ts +3 -2
  67. package/template-lib-vue-ts/tests/tsconfig.json +2 -1
  68. package/template-lib-vue-ts/tsconfig.json +1 -1
@@ -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,9 +16,13 @@ define.test({
22
16
  setupFiles: ['./tests/rstest.setup.ts'],
23
17
  });
24
18
 
25
- define.lint(({ js, ts }) => [
19
+ define.lint(({ js, ts, rstestPlugin }) => [
26
20
  js.configs.recommended,
27
21
  ts.configs.recommendedTypeChecked,
22
+ {
23
+ files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
24
+ ...rstestPlugin.configs.recommended,
25
+ },
28
26
  ]);
29
27
 
30
28
  define.fmt({
@@ -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",