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.
- package/package.json +2 -2
- package/template-app-lit/package.json +1 -1
- package/template-app-lit/rstack.config.js +8 -6
- package/template-app-lit-ts/package.json +1 -1
- package/template-app-lit-ts/rstack.config.ts +6 -6
- package/template-app-lit-ts/tests/tsconfig.json +7 -0
- package/template-app-preact/package.json +1 -1
- package/template-app-preact/rstack.config.js +6 -3
- package/template-app-preact-ts/package.json +1 -1
- package/template-app-preact-ts/rstack.config.ts +6 -3
- package/template-app-react/package.json +1 -1
- package/template-app-react/rstack.config.js +6 -3
- package/template-app-react-ts/package.json +1 -1
- package/template-app-react-ts/rstack.config.ts +6 -3
- package/template-app-solid/package.json +3 -3
- package/template-app-solid/rstack.config.js +8 -3
- package/template-app-solid-ts/package.json +3 -3
- package/template-app-solid-ts/rstack.config.ts +6 -3
- package/template-app-svelte/package.json +2 -2
- package/template-app-svelte/rstack.config.js +8 -3
- package/template-app-svelte-ts/package.json +3 -3
- package/template-app-svelte-ts/rstack.config.ts +6 -3
- package/template-app-svelte-ts/tests/tsconfig.json +1 -1
- package/template-app-vanilla/package.json +1 -1
- package/template-app-vanilla/rstack.config.js +8 -2
- package/template-app-vanilla/tests/dom.test.js +1 -1
- package/template-app-vanilla-ts/package.json +1 -1
- package/template-app-vanilla-ts/rstack.config.ts +6 -2
- package/template-app-vanilla-ts/tests/dom.test.ts +1 -1
- package/template-app-vue/package.json +1 -1
- package/template-app-vue/rstack.config.js +8 -3
- package/template-app-vue-ts/package.json +2 -2
- package/template-app-vue-ts/rstack.config.ts +6 -3
- package/template-doc/package.json +1 -1
- package/template-doc/rstack.config.ts +1 -1
- package/template-doc-i18n/package.json +1 -1
- package/template-doc-i18n/rstack.config.ts +1 -1
- package/template-lib-node/package.json +2 -6
- package/template-lib-node/rstack.config.js +9 -9
- package/template-lib-node-ts/package.json +1 -1
- package/template-lib-node-ts/rstack.config.ts +6 -7
- package/template-lib-node-ts/tests/tsconfig.json +8 -0
- package/template-lib-react/package.json +2 -6
- package/template-lib-react/rstack.config.js +6 -8
- package/template-lib-react-ts/package.json +1 -1
- package/template-lib-react-ts/rstack.config.ts +6 -8
- package/template-lib-react-ts/tests/tsconfig.json +1 -1
- package/template-lib-react-ts/tsconfig.json +1 -1
- package/template-lib-solid/package.json +3 -3
- package/template-lib-solid/rstack.config.js +9 -11
- package/template-lib-solid-ts/package.json +4 -4
- package/template-lib-solid-ts/rstack.config.ts +7 -11
- package/template-lib-solid-ts/tests/tsconfig.json +1 -1
- package/template-lib-solid-ts/tsconfig.json +1 -1
- package/template-lib-svelte/package.json +3 -7
- package/template-lib-svelte/rstack.config.js +8 -12
- package/template-lib-svelte-ts/package.json +4 -4
- package/template-lib-svelte-ts/rstack.config.ts +6 -12
- package/template-lib-svelte-ts/tests/tsconfig.json +3 -1
- package/template-lib-svelte-ts/tsconfig.json +4 -4
- package/template-lib-vue/package.json +2 -6
- package/template-lib-vue/rstack.config.js +8 -8
- package/template-lib-vue/tests/index.test.js +3 -2
- package/template-lib-vue-ts/package.json +2 -2
- package/template-lib-vue-ts/rstack.config.ts +6 -8
- package/template-lib-vue-ts/tests/index.test.ts +3 -2
- package/template-lib-vue-ts/tests/tsconfig.json +2 -1
- package/template-lib-vue-ts/tsconfig.json +1 -1
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
|
-
"exports":
|
|
7
|
-
".": {
|
|
8
|
-
"default": "./dist/index.js"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
6
|
+
"exports": "./dist/index.js",
|
|
11
7
|
"files": [
|
|
12
8
|
"dist",
|
|
13
9
|
"README.md"
|
|
@@ -22,7 +18,7 @@
|
|
|
22
18
|
"test:watch": "rs test --watch"
|
|
23
19
|
},
|
|
24
20
|
"devDependencies": {
|
|
25
|
-
"rstack": "^0.6.
|
|
21
|
+
"rstack": "^0.6.3"
|
|
26
22
|
},
|
|
27
23
|
"engines": {
|
|
28
24
|
"node": ">=22.12.0"
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
//
|
|
2
|
+
// Configuration guide: https://rstack.rs/config
|
|
3
3
|
import { define } from 'rstack';
|
|
4
4
|
|
|
5
|
-
define.lib({
|
|
6
|
-
syntax: ['node 22'],
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
define.test({
|
|
10
|
-
// Configure Rstest
|
|
11
|
-
});
|
|
5
|
+
define.lib({});
|
|
12
6
|
|
|
13
|
-
define.lint(({ js }) => [
|
|
7
|
+
define.lint(({ js, rstestPlugin }) => [
|
|
8
|
+
js.configs.recommended,
|
|
9
|
+
{
|
|
10
|
+
files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
11
|
+
...rstestPlugin.configs.recommended,
|
|
12
|
+
},
|
|
13
|
+
]);
|
|
14
14
|
|
|
15
15
|
define.fmt({
|
|
16
16
|
singleQuote: true,
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Configuration guide: https://rstack.rs/config
|
|
2
2
|
import { define } from 'rstack';
|
|
3
3
|
|
|
4
4
|
define.lib({
|
|
5
|
-
syntax: ['node 22'],
|
|
6
5
|
dts: true,
|
|
7
6
|
});
|
|
8
7
|
|
|
9
|
-
define.
|
|
10
|
-
// Configure Rstest
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
define.lint(({ js, ts }) => [
|
|
8
|
+
define.lint(({ js, ts, rstestPlugin }) => [
|
|
14
9
|
js.configs.recommended,
|
|
15
10
|
ts.configs.recommendedTypeChecked,
|
|
11
|
+
{
|
|
12
|
+
files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
13
|
+
...rstestPlugin.configs.recommended,
|
|
14
|
+
},
|
|
16
15
|
]);
|
|
17
16
|
|
|
18
17
|
define.fmt({
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
"name": "rstack-lib-react",
|
|
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"
|
|
@@ -29,7 +25,7 @@
|
|
|
29
25
|
"happy-dom": "^20.11.2",
|
|
30
26
|
"react": "^19.2.8",
|
|
31
27
|
"react-dom": "^19.2.8",
|
|
32
|
-
"rstack": "^0.6.
|
|
28
|
+
"rstack": "^0.6.3"
|
|
33
29
|
},
|
|
34
30
|
"peerDependencies": {
|
|
35
31
|
"react": ">=18.0.0",
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
//
|
|
2
|
+
// Configuration guide: https://rstack.rs/config
|
|
3
3
|
import { define } from 'rstack';
|
|
4
4
|
|
|
5
5
|
define.lib(async () => {
|
|
6
6
|
const { pluginReact } = await import('@rsbuild/plugin-react');
|
|
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,10 +17,14 @@ define.test({
|
|
|
23
17
|
setupFiles: ['./tests/rstest.setup.js'],
|
|
24
18
|
});
|
|
25
19
|
|
|
26
|
-
define.lint(({ js, reactHooksPlugin, reactPlugin }) => [
|
|
20
|
+
define.lint(({ js, reactHooksPlugin, reactPlugin, rstestPlugin }) => [
|
|
27
21
|
js.configs.recommended,
|
|
28
22
|
reactPlugin.configs.recommended,
|
|
29
23
|
reactHooksPlugin.configs.recommended,
|
|
24
|
+
{
|
|
25
|
+
files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
26
|
+
...rstestPlugin.configs.recommended,
|
|
27
|
+
},
|
|
30
28
|
]);
|
|
31
29
|
|
|
32
30
|
define.fmt({
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Configuration guide: https://rstack.rs/config
|
|
2
2
|
import { define } from 'rstack';
|
|
3
3
|
|
|
4
4
|
define.lib(async () => {
|
|
5
5
|
const { pluginReact } = await import('@rsbuild/plugin-react');
|
|
6
|
-
|
|
7
6
|
return {
|
|
8
7
|
bundle: false,
|
|
9
8
|
dts: true,
|
|
10
|
-
source: {
|
|
11
|
-
entry: {
|
|
12
|
-
index: ['./src/**'],
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
9
|
output: {
|
|
16
10
|
target: 'web',
|
|
17
11
|
},
|
|
@@ -23,11 +17,15 @@ define.test({
|
|
|
23
17
|
setupFiles: ['./tests/rstest.setup.ts'],
|
|
24
18
|
});
|
|
25
19
|
|
|
26
|
-
define.lint(({ js, ts, reactPlugin, reactHooksPlugin }) => [
|
|
20
|
+
define.lint(({ js, ts, reactPlugin, reactHooksPlugin, rstestPlugin }) => [
|
|
27
21
|
js.configs.recommended,
|
|
28
22
|
ts.configs.recommendedTypeChecked,
|
|
29
23
|
reactPlugin.configs.recommended,
|
|
30
24
|
reactHooksPlugin.configs.recommended,
|
|
25
|
+
{
|
|
26
|
+
files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
27
|
+
...rstestPlugin.configs.recommended,
|
|
28
|
+
},
|
|
31
29
|
]);
|
|
32
30
|
|
|
33
31
|
define.fmt({
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"test:watch": "rs test --watch"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@rsbuild/plugin-babel": "^2.0
|
|
25
|
+
"@rsbuild/plugin-babel": "^2.1.0",
|
|
26
26
|
"@rsbuild/plugin-solid": "^1.2.2",
|
|
27
27
|
"@solidjs/testing-library": "^0.8.10",
|
|
28
28
|
"@testing-library/jest-dom": "^7.0.1",
|
|
29
29
|
"happy-dom": "^20.11.2",
|
|
30
|
-
"rstack": "^0.6.
|
|
31
|
-
"solid-js": "^1.9.
|
|
30
|
+
"rstack": "^0.6.3",
|
|
31
|
+
"solid-js": "^1.9.15"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"solid-js": ">=1.8.0"
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
//
|
|
2
|
+
// Configuration guide: https://rstack.rs/config
|
|
3
3
|
import { define } from 'rstack';
|
|
4
4
|
|
|
5
5
|
define.lib(async () => {
|
|
6
6
|
const { pluginBabel } = await import('@rsbuild/plugin-babel');
|
|
7
7
|
const { pluginSolid } = await import('@rsbuild/plugin-solid');
|
|
8
|
-
|
|
9
8
|
return {
|
|
10
9
|
lib: [
|
|
11
10
|
{
|
|
12
11
|
id: 'compiled',
|
|
13
|
-
bundle: false,
|
|
14
12
|
plugins: [
|
|
15
13
|
pluginBabel({
|
|
16
14
|
include: /\.(?:jsx|tsx)$/,
|
|
@@ -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
|
-
|
|
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.js'],
|
|
69
61
|
plugins: [
|
|
@@ -75,7 +67,13 @@ define.test(async () => {
|
|
|
75
67
|
};
|
|
76
68
|
});
|
|
77
69
|
|
|
78
|
-
define.lint(({ js }) => [
|
|
70
|
+
define.lint(({ js, rstestPlugin }) => [
|
|
71
|
+
js.configs.recommended,
|
|
72
|
+
{
|
|
73
|
+
files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
74
|
+
...rstestPlugin.configs.recommended,
|
|
75
|
+
},
|
|
76
|
+
]);
|
|
79
77
|
|
|
80
78
|
define.fmt({
|
|
81
79
|
singleQuote: true,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
|
-
"solid": "./dist/index.jsx",
|
|
8
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"solid": "./dist/index.jsx",
|
|
9
9
|
"default": "./dist/index.js"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"test:watch": "rs test --watch"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@rsbuild/plugin-babel": "^2.0
|
|
27
|
+
"@rsbuild/plugin-babel": "^2.1.0",
|
|
28
28
|
"@rsbuild/plugin-solid": "^1.2.2",
|
|
29
29
|
"@solidjs/testing-library": "^0.8.10",
|
|
30
30
|
"@testing-library/jest-dom": "^7.0.1",
|
|
31
31
|
"@types/node": "^24.13.3",
|
|
32
32
|
"happy-dom": "^20.11.2",
|
|
33
|
-
"rstack": "^0.6.
|
|
34
|
-
"solid-js": "^1.9.
|
|
33
|
+
"rstack": "^0.6.3",
|
|
34
|
+
"solid-js": "^1.9.15",
|
|
35
35
|
"typescript": "^7.0.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
//
|
|
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
|
-
|
|
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,9 +67,13 @@ define.test(async () => {
|
|
|
75
67
|
};
|
|
76
68
|
});
|
|
77
69
|
|
|
78
|
-
define.lint(({ js, ts }) => [
|
|
70
|
+
define.lint(({ js, ts, rstestPlugin }) => [
|
|
79
71
|
js.configs.recommended,
|
|
80
72
|
ts.configs.recommendedTypeChecked,
|
|
73
|
+
{
|
|
74
|
+
files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
75
|
+
...rstestPlugin.configs.recommended,
|
|
76
|
+
},
|
|
81
77
|
]);
|
|
82
78
|
|
|
83
79
|
define.fmt({
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
"name": "rstack-lib-svelte",
|
|
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"
|
|
@@ -24,8 +20,8 @@
|
|
|
24
20
|
"@rsbuild/plugin-svelte": "^2.0.1",
|
|
25
21
|
"happy-dom": "^20.11.2",
|
|
26
22
|
"prettier-plugin-svelte": "^4.1.1",
|
|
27
|
-
"rstack": "^0.6.
|
|
28
|
-
"svelte": "^5.56.
|
|
23
|
+
"rstack": "^0.6.3",
|
|
24
|
+
"svelte": "^5.56.9"
|
|
29
25
|
},
|
|
30
26
|
"peerDependencies": {
|
|
31
27
|
"svelte": "^5.0.0"
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
//
|
|
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
8
|
bundle: false,
|
|
10
|
-
source: {
|
|
11
|
-
entry: {
|
|
12
|
-
index: ['./src/**'],
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
9
|
output: {
|
|
16
10
|
target: 'web',
|
|
17
11
|
},
|
|
@@ -19,11 +13,13 @@ define.lib(async () => {
|
|
|
19
13
|
};
|
|
20
14
|
});
|
|
21
15
|
|
|
22
|
-
define.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
define.lint(({ js, rstestPlugin }) => [
|
|
17
|
+
js.configs.recommended,
|
|
18
|
+
{
|
|
19
|
+
files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
20
|
+
...rstestPlugin.configs.recommended,
|
|
21
|
+
},
|
|
22
|
+
]);
|
|
27
23
|
|
|
28
24
|
define.fmt({
|
|
29
25
|
plugins: ['prettier-plugin-svelte'],
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"@types/node": "^24.13.3",
|
|
28
28
|
"happy-dom": "^20.11.2",
|
|
29
29
|
"prettier-plugin-svelte": "^4.1.1",
|
|
30
|
-
"rstack": "^0.6.
|
|
31
|
-
"svelte": "^5.56.
|
|
32
|
-
"svelte-check": "^4.7.
|
|
33
|
-
"svelte2tsx": "^0.7.
|
|
30
|
+
"rstack": "^0.6.3",
|
|
31
|
+
"svelte": "^5.56.9",
|
|
32
|
+
"svelte-check": "^4.7.6",
|
|
33
|
+
"svelte2tsx": "^0.7.61",
|
|
34
34
|
"typescript": "^6.0.3"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
//
|
|
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
8
|
bundle: false,
|
|
10
|
-
source: {
|
|
11
|
-
entry: {
|
|
12
|
-
index: ['./src/**'],
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
9
|
output: {
|
|
16
10
|
target: 'web',
|
|
17
11
|
},
|
|
@@ -19,13 +13,13 @@ define.lib(async () => {
|
|
|
19
13
|
};
|
|
20
14
|
});
|
|
21
15
|
|
|
22
|
-
define.
|
|
23
|
-
testEnvironment: 'happy-dom',
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
define.lint(({ js, ts }) => [
|
|
16
|
+
define.lint(({ js, ts, rstestPlugin }) => [
|
|
27
17
|
js.configs.recommended,
|
|
28
18
|
ts.configs.recommendedTypeChecked,
|
|
19
|
+
{
|
|
20
|
+
files: ['**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
21
|
+
...rstestPlugin.configs.recommended,
|
|
22
|
+
},
|
|
29
23
|
]);
|
|
30
24
|
|
|
31
25
|
define.fmt({
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"target": "ES2022",
|
|
5
5
|
"declaration": true,
|
|
6
6
|
"emitDeclarationOnly": true,
|
|
7
|
-
"
|
|
7
|
+
"outDir": "dist",
|
|
8
8
|
"skipLibCheck": true,
|
|
9
|
-
"types": ["rstack/types", "
|
|
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"
|
|
24
|
+
"include": ["src"]
|
|
25
25
|
}
|
|
@@ -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"
|
|
@@ -25,7 +21,7 @@
|
|
|
25
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.
|
|
24
|
+
"rstack": "^0.6.3",
|
|
29
25
|
"vue": "^3.5.41"
|
|
30
26
|
},
|
|
31
27
|
"peerDependencies": {
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
-
//
|
|
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,7 +17,13 @@ define.test({
|
|
|
23
17
|
setupFiles: ['./tests/rstest.setup.js'],
|
|
24
18
|
});
|
|
25
19
|
|
|
26
|
-
define.lint(({ js }) => [
|
|
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
|
+
]);
|
|
27
27
|
|
|
28
28
|
define.fmt({
|
|
29
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
|
-
|
|
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
|
});
|
|
@@ -28,10 +28,10 @@
|
|
|
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.
|
|
31
|
+
"rstack": "^0.6.3",
|
|
32
32
|
"typescript": "^6.0.3",
|
|
33
33
|
"vue": "^3.5.41",
|
|
34
|
-
"vue-tsc": "^3.3.
|
|
34
|
+
"vue-tsc": "^3.3.10"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"vue": ">=3.2.0"
|