create-rspack-canary 1.3.6-canary-79417975-20250422094422 → 1.3.6-canary-6bee9d50-20250425072153

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 ADDED
@@ -0,0 +1,71 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
3
+ import * as __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__ from "create-rstack";
4
+ const src_dirname = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].dirname((0, __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__.fileURLToPath)(import.meta.url));
5
+ async function getTemplateName({ template }) {
6
+ if ("string" == typeof template) {
7
+ const pair = template.split("-");
8
+ const language = pair[1] ?? "js";
9
+ const framework = pair[0];
10
+ return `${framework}-${language}`;
11
+ }
12
+ const framework = (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.checkCancel)(await (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.select)({
13
+ message: "Select framework",
14
+ options: [
15
+ {
16
+ value: "vanilla",
17
+ label: "Vanilla"
18
+ },
19
+ {
20
+ value: "react",
21
+ label: "React"
22
+ },
23
+ {
24
+ value: "vue",
25
+ label: "Vue"
26
+ }
27
+ ]
28
+ }));
29
+ const language = (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.checkCancel)(await (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.select)({
30
+ message: "Select language",
31
+ options: [
32
+ {
33
+ value: "ts",
34
+ label: "TypeScript"
35
+ },
36
+ {
37
+ value: "js",
38
+ label: "JavaScript"
39
+ }
40
+ ]
41
+ }));
42
+ return `${framework}-${language}`;
43
+ }
44
+ function mapESLintTemplate(templateName) {
45
+ switch(templateName){
46
+ case "react-js":
47
+ case "react-ts":
48
+ case "vue-js":
49
+ case "vue-ts":
50
+ return templateName;
51
+ }
52
+ const language = templateName.split("-")[1];
53
+ return `vanilla-${language}`;
54
+ }
55
+ (0, __WEBPACK_EXTERNAL_MODULE_create_rstack_aeeb76b8__.create)({
56
+ root: __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(src_dirname, ".."),
57
+ name: "rspack",
58
+ templates: [
59
+ "vanilla-js",
60
+ "vanilla-ts",
61
+ "react-js",
62
+ "react-ts",
63
+ "vue-js",
64
+ "vue-ts"
65
+ ],
66
+ skipFiles: [
67
+ ".npmignore"
68
+ ],
69
+ getTemplateName,
70
+ mapESLintTemplate
71
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rspack-canary",
3
- "version": "1.3.6-canary-79417975-20250422094422",
3
+ "version": "1.3.6-canary-6bee9d50-20250425072153",
4
4
  "homepage": "https://rspack.dev",
5
5
  "bugs": "https://github.com/web-infra-dev/rspack/issues",
6
6
  "repository": {
@@ -23,7 +23,7 @@
23
23
  "create-rstack": "1.4.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@rslib/core": "0.6.3",
26
+ "@rslib/core": "0.6.7",
27
27
  "typescript": "^5.7.3"
28
28
  },
29
29
  "publishConfig": {
@@ -1,10 +1,10 @@
1
- import React from 'react'
2
- import ReactDOM from 'react-dom/client'
3
- import App from './App'
4
- import './index.css'
1
+ import React from "react";
2
+ import ReactDOM from "react-dom/client";
3
+ import App from "./App";
4
+ import "./index.css";
5
5
 
6
- ReactDOM.createRoot(document.getElementById('root')).render(
7
- <React.StrictMode>
8
- <App />
9
- </React.StrictMode>
10
- )
6
+ ReactDOM.createRoot(document.getElementById("root")).render(
7
+ <React.StrictMode>
8
+ <App />
9
+ </React.StrictMode>
10
+ );