create-rspack 1.0.4 → 1.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/dist/index.js +6 -18
- package/package.json +3 -3
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
|
-
;// CONCATENATED MODULE: external "node:path"
|
|
7
|
-
|
|
8
5
|
var external_node_path_namespaceObject = __WEBPACK_EXTERNAL_MODULE_node_path__;
|
|
9
|
-
|
|
10
|
-
;// CONCATENATED MODULE: external "create-rstack"
|
|
11
|
-
|
|
12
6
|
var external_create_rstack_namespaceObject = __WEBPACK_EXTERNAL_MODULE_create_rstack__;
|
|
13
|
-
|
|
14
|
-
;// CONCATENATED MODULE: ./src/index.ts
|
|
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 framework = pair[0];
|
|
24
13
|
return `${framework}-${language}`;
|
|
25
14
|
}
|
|
26
|
-
const framework = (0,external_create_rstack_namespaceObject.checkCancel)(await (0,external_create_rstack_namespaceObject.select)({
|
|
15
|
+
const framework = (0, external_create_rstack_namespaceObject.checkCancel)(await (0, external_create_rstack_namespaceObject.select)({
|
|
27
16
|
message: "Select framework",
|
|
28
17
|
options: [
|
|
29
18
|
{
|
|
@@ -40,7 +29,7 @@ async function getTemplateName({ template }) {
|
|
|
40
29
|
}
|
|
41
30
|
]
|
|
42
31
|
}));
|
|
43
|
-
const language = (0,external_create_rstack_namespaceObject.checkCancel)(await (0,external_create_rstack_namespaceObject.select)({
|
|
32
|
+
const language = (0, external_create_rstack_namespaceObject.checkCancel)(await (0, external_create_rstack_namespaceObject.select)({
|
|
44
33
|
message: "Select language",
|
|
45
34
|
options: [
|
|
46
35
|
{
|
|
@@ -66,7 +55,7 @@ function mapESLintTemplate(templateName) {
|
|
|
66
55
|
const language = templateName.split("-")[1];
|
|
67
56
|
return `vanilla-${language}`;
|
|
68
57
|
}
|
|
69
|
-
(0,external_create_rstack_namespaceObject.create)({
|
|
58
|
+
(0, external_create_rstack_namespaceObject.create)({
|
|
70
59
|
root: external_node_path_namespaceObject["default"].resolve(src_dirname, ".."),
|
|
71
60
|
name: "rspack",
|
|
72
61
|
templates: [
|
|
@@ -83,4 +72,3 @@ function mapESLintTemplate(templateName) {
|
|
|
83
72
|
getTemplateName,
|
|
84
73
|
mapESLintTemplate
|
|
85
74
|
});
|
|
86
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rspack",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"homepage": "https://rspack.dev",
|
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspack/issues",
|
|
6
6
|
"repository": {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"bin.js"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"create-rstack": "1.0.
|
|
23
|
+
"create-rstack": "1.0.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@rslib/core": "0.0.
|
|
26
|
+
"@rslib/core": "0.0.5",
|
|
27
27
|
"typescript": "5.0.2"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|