create-rslib 0.0.0-20250124083417
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/LICENSE +21 -0
- package/README.md +19 -0
- package/dist/index.js +187 -0
- package/package.json +52 -0
- package/template-[node-dual]-[]-js/package.json +23 -0
- package/template-[node-dual]-[]-js/rslib.config.mjs +14 -0
- package/template-[node-dual]-[]-js/src/index.js +1 -0
- package/template-[node-dual]-[]-ts/package.json +27 -0
- package/template-[node-dual]-[]-ts/rslib.config.ts +15 -0
- package/template-[node-dual]-[]-ts/src/index.ts +1 -0
- package/template-[node-dual]-[]-ts/tsconfig.json +15 -0
- package/template-[node-dual]-[vitest]-js/package.json +25 -0
- package/template-[node-dual]-[vitest]-js/rslib.config.mjs +14 -0
- package/template-[node-dual]-[vitest]-js/src/index.js +1 -0
- package/template-[node-dual]-[vitest]-js/tests/index.test.js +7 -0
- package/template-[node-dual]-[vitest]-js/vitest.config.js +8 -0
- package/template-[node-dual]-[vitest]-ts/package.json +29 -0
- package/template-[node-dual]-[vitest]-ts/rslib.config.ts +15 -0
- package/template-[node-dual]-[vitest]-ts/src/index.ts +1 -0
- package/template-[node-dual]-[vitest]-ts/tests/index.test.ts +7 -0
- package/template-[node-dual]-[vitest]-ts/tests/tsconfig.json +4 -0
- package/template-[node-dual]-[vitest]-ts/tsconfig.json +15 -0
- package/template-[node-dual]-[vitest]-ts/vitest.config.ts +6 -0
- package/template-[node-esm]-[]-js/package.json +21 -0
- package/template-[node-esm]-[]-js/rslib.config.mjs +10 -0
- package/template-[node-esm]-[]-js/src/index.js +1 -0
- package/template-[node-esm]-[]-ts/package.json +25 -0
- package/template-[node-esm]-[]-ts/rslib.config.ts +11 -0
- package/template-[node-esm]-[]-ts/src/index.ts +1 -0
- package/template-[node-esm]-[]-ts/tsconfig.json +15 -0
- package/template-[node-esm]-[vitest]-js/package.json +23 -0
- package/template-[node-esm]-[vitest]-js/rslib.config.mjs +10 -0
- package/template-[node-esm]-[vitest]-js/src/index.js +1 -0
- package/template-[node-esm]-[vitest]-js/tests/index.test.js +7 -0
- package/template-[node-esm]-[vitest]-js/vitest.config.js +8 -0
- package/template-[node-esm]-[vitest]-ts/package.json +27 -0
- package/template-[node-esm]-[vitest]-ts/rslib.config.ts +11 -0
- package/template-[node-esm]-[vitest]-ts/src/index.ts +1 -0
- package/template-[node-esm]-[vitest]-ts/tests/index.test.ts +7 -0
- package/template-[node-esm]-[vitest]-ts/tests/tsconfig.json +4 -0
- package/template-[node-esm]-[vitest]-ts/tsconfig.json +15 -0
- package/template-[node-esm]-[vitest]-ts/vitest.config.ts +6 -0
- package/template-[react]-[]-js/package.json +27 -0
- package/template-[react]-[]-js/rslib.config.mjs +20 -0
- package/template-[react]-[]-js/src/Button.jsx +21 -0
- package/template-[react]-[]-js/src/button.css +34 -0
- package/template-[react]-[]-js/src/index.jsx +1 -0
- package/template-[react]-[]-ts/package.json +31 -0
- package/template-[react]-[]-ts/rslib.config.ts +21 -0
- package/template-[react]-[]-ts/src/Button.tsx +29 -0
- package/template-[react]-[]-ts/src/button.css +34 -0
- package/template-[react]-[]-ts/src/index.tsx +1 -0
- package/template-[react]-[]-ts/tsconfig.json +14 -0
- package/template-[react]-[storybook,vitest]-js/.storybook/main.js +38 -0
- package/template-[react]-[storybook,vitest]-js/.storybook/preview.js +12 -0
- package/template-[react]-[storybook,vitest]-js/package.json +45 -0
- package/template-[react]-[storybook,vitest]-js/rslib.config.mjs +20 -0
- package/template-[react]-[storybook,vitest]-js/src/Button.jsx +21 -0
- package/template-[react]-[storybook,vitest]-js/src/button.css +34 -0
- package/template-[react]-[storybook,vitest]-js/src/index.jsx +1 -0
- package/template-[react]-[storybook,vitest]-js/stories/Button.stories.jsx +50 -0
- package/template-[react]-[storybook,vitest]-js/tests/index.test.jsx +11 -0
- package/template-[react]-[storybook,vitest]-js/vitest.config.js +11 -0
- package/template-[react]-[storybook,vitest]-js/vitest.setup.js +1 -0
- package/template-[react]-[storybook,vitest]-ts/.storybook/main.ts +39 -0
- package/template-[react]-[storybook,vitest]-ts/.storybook/preview.ts +14 -0
- package/template-[react]-[storybook,vitest]-ts/package.json +49 -0
- package/template-[react]-[storybook,vitest]-ts/rslib.config.ts +21 -0
- package/template-[react]-[storybook,vitest]-ts/src/Button.tsx +29 -0
- package/template-[react]-[storybook,vitest]-ts/src/button.css +34 -0
- package/template-[react]-[storybook,vitest]-ts/src/index.tsx +1 -0
- package/template-[react]-[storybook,vitest]-ts/stories/Button.stories.ts +52 -0
- package/template-[react]-[storybook,vitest]-ts/tests/index.test.tsx +11 -0
- package/template-[react]-[storybook,vitest]-ts/tests/tsconfig.json +4 -0
- package/template-[react]-[storybook,vitest]-ts/tsconfig.json +14 -0
- package/template-[react]-[storybook,vitest]-ts/vitest.config.ts +9 -0
- package/template-[react]-[storybook,vitest]-ts/vitest.setup.ts +1 -0
- package/template-[react]-[storybook]-js/.storybook/main.js +38 -0
- package/template-[react]-[storybook]-js/.storybook/preview.js +12 -0
- package/template-[react]-[storybook]-js/package.json +40 -0
- package/template-[react]-[storybook]-js/rslib.config.mjs +20 -0
- package/template-[react]-[storybook]-js/src/Button.jsx +21 -0
- package/template-[react]-[storybook]-js/src/button.css +34 -0
- package/template-[react]-[storybook]-js/src/index.jsx +1 -0
- package/template-[react]-[storybook]-js/stories/Button.stories.jsx +50 -0
- package/template-[react]-[storybook]-ts/.storybook/main.ts +39 -0
- package/template-[react]-[storybook]-ts/.storybook/preview.ts +14 -0
- package/template-[react]-[storybook]-ts/package.json +44 -0
- package/template-[react]-[storybook]-ts/rslib.config.ts +21 -0
- package/template-[react]-[storybook]-ts/src/Button.tsx +29 -0
- package/template-[react]-[storybook]-ts/src/button.css +34 -0
- package/template-[react]-[storybook]-ts/src/index.tsx +1 -0
- package/template-[react]-[storybook]-ts/stories/Button.stories.ts +52 -0
- package/template-[react]-[storybook]-ts/tsconfig.json +14 -0
- package/template-[react]-[vitest]-js/package.json +32 -0
- package/template-[react]-[vitest]-js/rslib.config.mjs +20 -0
- package/template-[react]-[vitest]-js/src/Button.jsx +21 -0
- package/template-[react]-[vitest]-js/src/button.css +34 -0
- package/template-[react]-[vitest]-js/src/index.jsx +1 -0
- package/template-[react]-[vitest]-js/tests/index.test.jsx +11 -0
- package/template-[react]-[vitest]-js/vitest.config.js +11 -0
- package/template-[react]-[vitest]-js/vitest.setup.js +1 -0
- package/template-[react]-[vitest]-ts/package.json +36 -0
- package/template-[react]-[vitest]-ts/rslib.config.ts +21 -0
- package/template-[react]-[vitest]-ts/src/Button.tsx +29 -0
- package/template-[react]-[vitest]-ts/src/button.css +34 -0
- package/template-[react]-[vitest]-ts/src/index.tsx +1 -0
- package/template-[react]-[vitest]-ts/tests/index.test.tsx +11 -0
- package/template-[react]-[vitest]-ts/tests/tsconfig.json +4 -0
- package/template-[react]-[vitest]-ts/tsconfig.json +14 -0
- package/template-[react]-[vitest]-ts/vitest.config.ts +9 -0
- package/template-[react]-[vitest]-ts/vitest.setup.ts +1 -0
- package/template-common/README.md +23 -0
- package/template-common/gitignore +13 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present Bytedance, Inc. and its affiliates.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<picture>
|
|
2
|
+
<img alt="Rslib Banner" src="https://assets.rspack.dev/rslib/rslib-banner.png">
|
|
3
|
+
</picture>
|
|
4
|
+
|
|
5
|
+
# Rslib
|
|
6
|
+
|
|
7
|
+
Rslib is a library development tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack.
|
|
8
|
+
|
|
9
|
+
## Documentation
|
|
10
|
+
|
|
11
|
+
https://lib.rsbuild.dev/
|
|
12
|
+
|
|
13
|
+
## Contributing
|
|
14
|
+
|
|
15
|
+
Please read the [Contributing Guide](https://github.com/web-infra-dev/rslib/blob/main/CONTRIBUTING.md).
|
|
16
|
+
|
|
17
|
+
## License
|
|
18
|
+
|
|
19
|
+
Rslib is [MIT licensed](https://github.com/web-infra-dev/rslib/blob/main/LICENSE).
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__ from "create-rstack";
|
|
5
|
+
import "node:fs";
|
|
6
|
+
const helpers_filename = (0, __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__.fileURLToPath)(import.meta.url);
|
|
7
|
+
const helpers_dirname = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].dirname(helpers_filename);
|
|
8
|
+
__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(helpers_dirname, '../fragments');
|
|
9
|
+
const composeTemplateName = ({ template, tools, lang })=>`[${template}]-[${(tools ? Object.keys(tools) : []).sort()}]-${lang}`;
|
|
10
|
+
const TEMPLATES = [
|
|
11
|
+
{
|
|
12
|
+
template: 'node-dual',
|
|
13
|
+
lang: 'js'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
template: 'node-dual',
|
|
17
|
+
lang: 'ts'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
template: 'node-dual',
|
|
21
|
+
lang: 'js',
|
|
22
|
+
tools: {
|
|
23
|
+
vitest: 'vitest-node-js'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
template: 'node-dual',
|
|
28
|
+
lang: 'ts',
|
|
29
|
+
tools: {
|
|
30
|
+
vitest: 'vitest-node-ts'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
template: 'node-esm',
|
|
35
|
+
lang: 'js'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
template: 'node-esm',
|
|
39
|
+
lang: 'ts'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
template: 'node-esm',
|
|
43
|
+
lang: 'js',
|
|
44
|
+
tools: {
|
|
45
|
+
vitest: 'vitest-node-js'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
template: 'node-esm',
|
|
50
|
+
lang: 'ts',
|
|
51
|
+
tools: {
|
|
52
|
+
vitest: 'vitest-node-ts'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
template: 'react',
|
|
57
|
+
lang: 'js'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
template: 'react',
|
|
61
|
+
lang: 'js',
|
|
62
|
+
tools: {
|
|
63
|
+
storybook: 'storybook-react-js'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
template: 'react',
|
|
68
|
+
lang: 'js',
|
|
69
|
+
tools: {
|
|
70
|
+
vitest: 'vitest-react-js'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
template: 'react',
|
|
75
|
+
lang: 'js',
|
|
76
|
+
tools: {
|
|
77
|
+
storybook: 'storybook-react-js',
|
|
78
|
+
vitest: 'vitest-react-js'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
template: 'react',
|
|
83
|
+
lang: 'ts'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
template: 'react',
|
|
87
|
+
lang: 'ts',
|
|
88
|
+
tools: {
|
|
89
|
+
storybook: 'storybook-react-ts'
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
template: 'react',
|
|
94
|
+
lang: 'ts',
|
|
95
|
+
tools: {
|
|
96
|
+
vitest: 'vitest-react-ts'
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
template: 'react',
|
|
101
|
+
lang: 'ts',
|
|
102
|
+
tools: {
|
|
103
|
+
storybook: 'storybook-react-ts',
|
|
104
|
+
vitest: 'vitest-react-ts'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
];
|
|
108
|
+
const src_dirname = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].dirname((0, __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__.fileURLToPath)(import.meta.url));
|
|
109
|
+
async function getTemplateName({ template }) {
|
|
110
|
+
if ('string' == typeof template) {
|
|
111
|
+
const pair = template.split('-');
|
|
112
|
+
const lang = pair[pair.length - 1];
|
|
113
|
+
if (lang && [
|
|
114
|
+
'js',
|
|
115
|
+
'ts'
|
|
116
|
+
].includes(lang)) return template;
|
|
117
|
+
return `${template}-ts`;
|
|
118
|
+
}
|
|
119
|
+
const templateName = (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.checkCancel)(await (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.select)({
|
|
120
|
+
message: 'Select template',
|
|
121
|
+
options: [
|
|
122
|
+
{
|
|
123
|
+
value: 'node-dual',
|
|
124
|
+
label: 'Node.js dual ESM/CJS package'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
value: 'node-esm',
|
|
128
|
+
label: 'Node.js pure ESM package'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
value: 'react',
|
|
132
|
+
label: 'React'
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}));
|
|
136
|
+
const language = (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.checkCancel)(await (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.select)({
|
|
137
|
+
message: 'Select language',
|
|
138
|
+
options: [
|
|
139
|
+
{
|
|
140
|
+
value: 'ts',
|
|
141
|
+
label: 'TypeScript'
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
value: 'js',
|
|
145
|
+
label: 'JavaScript'
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}));
|
|
149
|
+
const supportStorybook = 'react' === templateName;
|
|
150
|
+
const tools = (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.checkCancel)(await (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.multiselect)({
|
|
151
|
+
message: 'Select development tools (Use <space> to select, <enter> to continue)',
|
|
152
|
+
required: false,
|
|
153
|
+
options: [
|
|
154
|
+
supportStorybook && {
|
|
155
|
+
value: 'storybook',
|
|
156
|
+
label: 'Storybook'
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
value: 'vitest',
|
|
160
|
+
label: 'Vitest'
|
|
161
|
+
}
|
|
162
|
+
].filter(Boolean)
|
|
163
|
+
}));
|
|
164
|
+
return composeTemplateName({
|
|
165
|
+
template: templateName,
|
|
166
|
+
lang: language,
|
|
167
|
+
tools: Object.fromEntries(tools.map((tool)=>[
|
|
168
|
+
tool,
|
|
169
|
+
`vitest-${tool}-${language}`
|
|
170
|
+
]))
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function mapESLintTemplate(templateName) {
|
|
174
|
+
const language = templateName.split('-').pop();
|
|
175
|
+
return `vanilla-${language}`;
|
|
176
|
+
}
|
|
177
|
+
(0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.create)({
|
|
178
|
+
root: __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(src_dirname, '..'),
|
|
179
|
+
name: 'rslib',
|
|
180
|
+
templates: TEMPLATES.map(({ template, tools, lang })=>composeTemplateName({
|
|
181
|
+
template,
|
|
182
|
+
lang,
|
|
183
|
+
tools
|
|
184
|
+
})),
|
|
185
|
+
getTemplateName,
|
|
186
|
+
mapESLintTemplate
|
|
187
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-rslib",
|
|
3
|
+
"version": "0.0.0-20250124083417",
|
|
4
|
+
"description": "Create a new Rslib project",
|
|
5
|
+
"homepage": "https://lib.rsbuild.dev",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/web-infra-dev/rslib.git",
|
|
9
|
+
"directory": "packages/create-rslib"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"bin": {
|
|
18
|
+
"create-rslib": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"template-*",
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"create-rstack": "1.1.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/fs-extra": "^11.0.4",
|
|
29
|
+
"@types/node": "^22.8.1",
|
|
30
|
+
"fs-extra": "^11.3.0",
|
|
31
|
+
"rsbuild-plugin-publint": "^0.2.1",
|
|
32
|
+
"rslib": "npm:@rslib/core@0.3.2",
|
|
33
|
+
"tsx": "^4.19.2",
|
|
34
|
+
"typescript": "^5.7.3",
|
|
35
|
+
"@rslib/tsconfig": "0.0.1"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=16.7.0"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public",
|
|
42
|
+
"provenance": true,
|
|
43
|
+
"registry": "https://registry.npmjs.org/"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "rslib build && pnpm generate-templates",
|
|
47
|
+
"dev": "rslib build --watch",
|
|
48
|
+
"generate-templates": "pnpm tsx ./src/genTemplates.ts",
|
|
49
|
+
"start": "node ./dist/index.js",
|
|
50
|
+
"test": "vitest run"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rslib-node-dual-js",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./dist/index.js",
|
|
8
|
+
"require": "./dist/index.cjs"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.cjs",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "rslib build",
|
|
18
|
+
"dev": "rslib build --watch"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@rslib/core": "workspace:*"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const squared = (n) => n * n;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rslib-node-dual-ts",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"require": "./dist/index.cjs"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/index.cjs",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "rslib build",
|
|
20
|
+
"dev": "rslib build --watch"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@rslib/core": "workspace:*",
|
|
24
|
+
"@types/node": "^22.8.1",
|
|
25
|
+
"typescript": "^5.7.3"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const squared = (n: number): number => n * n;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": ["ES2021"],
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"noEmit": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"isolatedModules": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"useDefineForClassFields": true,
|
|
12
|
+
"allowImportingTsExtensions": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rslib-node-dual-js",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./dist/index.js",
|
|
8
|
+
"require": "./dist/index.cjs"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.cjs",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "rslib build",
|
|
18
|
+
"dev": "rslib build --watch",
|
|
19
|
+
"test": "vitest run"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@rslib/core": "workspace:*",
|
|
23
|
+
"vitest": "^3.0.4"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const squared = (n) => n * n;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rslib-node-dual-ts",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"require": "./dist/index.cjs"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/index.cjs",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "rslib build",
|
|
20
|
+
"dev": "rslib build --watch",
|
|
21
|
+
"test": "vitest run"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@rslib/core": "workspace:*",
|
|
25
|
+
"@types/node": "^22.8.1",
|
|
26
|
+
"typescript": "^5.7.3",
|
|
27
|
+
"vitest": "^3.0.4"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const squared = (n: number): number => n * n;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": ["ES2021"],
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"noEmit": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"isolatedModules": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"useDefineForClassFields": true,
|
|
12
|
+
"allowImportingTsExtensions": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rslib-node-esm-js",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./dist/index.js"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "rslib build",
|
|
16
|
+
"dev": "rslib build --watch"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@rslib/core": "workspace:*"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const squared = (n) => n * n;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rslib-node-esm-ts",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "rslib build",
|
|
18
|
+
"dev": "rslib build --watch"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@rslib/core": "workspace:*",
|
|
22
|
+
"@types/node": "^22.8.1",
|
|
23
|
+
"typescript": "^5.7.3"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const squared = (n: number): number => n * n;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": ["ES2021"],
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"noEmit": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"isolatedModules": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"useDefineForClassFields": true,
|
|
12
|
+
"allowImportingTsExtensions": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rslib-node-esm-js",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": "./dist/index.js"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "rslib build",
|
|
16
|
+
"dev": "rslib build --watch",
|
|
17
|
+
"test": "vitest run"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@rslib/core": "workspace:*",
|
|
21
|
+
"vitest": "^3.0.4"
|
|
22
|
+
}
|
|
23
|
+
}
|