create-rslib 0.0.4 → 0.0.6
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/README.md +2 -2
- package/bin.js +2 -0
- package/dist/index.js +8 -20
- package/package.json +8 -7
- package/template-example-ts/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
Rslib is a library build tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Documentation
|
|
10
10
|
|
|
11
|
-
https://
|
|
11
|
+
https://lib.rsbuild.dev/
|
|
12
12
|
|
|
13
13
|
## Contributing
|
|
14
14
|
|
package/bin.js
ADDED
package/dist/index.js
CHANGED
|
@@ -1,29 +1,18 @@
|
|
|
1
|
-
import {fileURLToPath as __webpack_fileURLToPath__} from "url";
|
|
2
|
-
import {dirname as __webpack_dirname__} from "path";
|
|
1
|
+
import { fileURLToPath as __webpack_fileURLToPath__ } from "url";
|
|
2
|
+
import { dirname as __webpack_dirname__ } from "path";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path__ from "node:path";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_create_rstack__ from "create-rstack";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var external_node_path_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_path__;
|
|
9
|
-
|
|
10
|
-
;// CONCATENATED MODULE: external "create-rstack"
|
|
11
|
-
|
|
12
|
-
var external_create_rstack_namespaceObject = __WEBPACK_EXTERNAL_MODULE_create_rstack__;
|
|
13
|
-
|
|
14
|
-
;// CONCATENATED MODULE: ./src/index.ts
|
|
5
|
+
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_path__;
|
|
6
|
+
const external_create_rstack_namespaceObject = __WEBPACK_EXTERNAL_MODULE_create_rstack__;
|
|
15
7
|
var src_dirname = __webpack_dirname__(__webpack_fileURLToPath__(import.meta.url));
|
|
16
|
-
//#!/usr/bin/env node
|
|
17
|
-
|
|
18
|
-
|
|
19
8
|
async function getTemplateName({ template }) {
|
|
20
|
-
if (typeof template
|
|
9
|
+
if ('string' == typeof template) {
|
|
21
10
|
const pair = template.split('-');
|
|
22
11
|
const language = pair[1] ?? 'js';
|
|
23
12
|
const type = pair[0];
|
|
24
13
|
return `${type}-${language}`;
|
|
25
14
|
}
|
|
26
|
-
const type = (0,external_create_rstack_namespaceObject.checkCancel)(await (0,external_create_rstack_namespaceObject.select)({
|
|
15
|
+
const type = (0, external_create_rstack_namespaceObject.checkCancel)(await (0, external_create_rstack_namespaceObject.select)({
|
|
27
16
|
message: 'Select template',
|
|
28
17
|
options: [
|
|
29
18
|
{
|
|
@@ -32,7 +21,7 @@ async function getTemplateName({ template }) {
|
|
|
32
21
|
}
|
|
33
22
|
]
|
|
34
23
|
}));
|
|
35
|
-
const language = (0,external_create_rstack_namespaceObject.checkCancel)(await (0,external_create_rstack_namespaceObject.select)({
|
|
24
|
+
const language = (0, external_create_rstack_namespaceObject.checkCancel)(await (0, external_create_rstack_namespaceObject.select)({
|
|
36
25
|
message: 'Select language',
|
|
37
26
|
options: [
|
|
38
27
|
{
|
|
@@ -51,7 +40,7 @@ function mapESLintTemplate(templateName) {
|
|
|
51
40
|
const language = templateName.split('-')[1];
|
|
52
41
|
return `vanilla-${language}`;
|
|
53
42
|
}
|
|
54
|
-
(0,external_create_rstack_namespaceObject.create)({
|
|
43
|
+
(0, external_create_rstack_namespaceObject.create)({
|
|
55
44
|
root: external_node_path_namespaceObject["default"].resolve(src_dirname, '..'),
|
|
56
45
|
name: 'rslib',
|
|
57
46
|
templates: [
|
|
@@ -61,4 +50,3 @@ function mapESLintTemplate(templateName) {
|
|
|
61
50
|
getTemplateName,
|
|
62
51
|
mapESLintTemplate
|
|
63
52
|
});
|
|
64
|
-
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rslib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Create a new Rslib project",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://lib.rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/web-infra-dev/rslib",
|
|
@@ -15,21 +15,22 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"bin": {
|
|
18
|
-
"create-rslib": "./
|
|
18
|
+
"create-rslib": "./bin.js"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"template-*",
|
|
22
|
-
"dist"
|
|
22
|
+
"dist",
|
|
23
|
+
"bin.js"
|
|
23
24
|
],
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"create-rstack": "1.0.
|
|
26
|
+
"create-rstack": "1.0.2"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@types/fs-extra": "^11.0.4",
|
|
29
30
|
"@types/node": "~18.19.39",
|
|
30
31
|
"fs-extra": "^11.2.0",
|
|
31
|
-
"rslib": "npm:@rslib/core@0.0.
|
|
32
|
-
"typescript": "^5.
|
|
32
|
+
"rslib": "npm:@rslib/core@0.0.5",
|
|
33
|
+
"typescript": "^5.6.2",
|
|
33
34
|
"@rslib/tsconfig": "0.0.1"
|
|
34
35
|
},
|
|
35
36
|
"engines": {
|