create-weapp-vite 2.0.65 → 2.0.67
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/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-D7vAuXs8.js → src-D5i9wzVM.js} +11 -5
- package/package.json +1 -1
- package/templates/default/.vscode/settings.json +6 -0
- package/templates/lib/.vscode/settings.json +6 -0
- package/templates/lib/package.json +1 -1
- package/templates/tailwindcss/.vscode/settings.json +31 -0
- package/templates/tdesign/.vscode/settings.json +31 -0
- package/templates/vant/.vscode/settings.json +31 -0
- package/templates/wevu/.vscode/settings.json +6 -0
- package/templates/wevu-tdesign/.vscode/settings.json +29 -3
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TemplateName, t as createProject } from "./src-
|
|
1
|
+
import { n as TemplateName, t as createProject } from "./src-D5i9wzVM.js";
|
|
2
2
|
export { TemplateName, createProject };
|
|
@@ -4,10 +4,10 @@ import fs from "fs-extra";
|
|
|
4
4
|
import path from "pathe";
|
|
5
5
|
import https from "node:https";
|
|
6
6
|
//#region ../weapp-vite/package.json
|
|
7
|
-
var version$1 = "6.11.
|
|
7
|
+
var version$1 = "6.11.9";
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region ../wevu/package.json
|
|
10
|
-
var version = "6.11.
|
|
10
|
+
var version = "6.11.9";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/enums.ts
|
|
13
13
|
let TemplateName = /* @__PURE__ */ function(TemplateName) {
|
|
@@ -289,6 +289,10 @@ function resolveWorkspaceTemplateDir(templateName) {
|
|
|
289
289
|
const templateDirName = TEMPLATE_DIR_MAP[templateName];
|
|
290
290
|
return templateDirName ? path.resolve(moduleDir, "../../../templates", templateDirName) : path.resolve(moduleDir, "../../../templates", templateName);
|
|
291
291
|
}
|
|
292
|
+
function normalizeTemplateRelativePath(relativePath) {
|
|
293
|
+
if (!relativePath || relativePath === ".") return "";
|
|
294
|
+
return relativePath.split("\\").join("/");
|
|
295
|
+
}
|
|
292
296
|
async function resolveTemplateDirs(templateName) {
|
|
293
297
|
const packagedTemplateDir = path.resolve(moduleDir, "../templates", templateName);
|
|
294
298
|
const workspaceTemplateDir = resolveWorkspaceTemplateDir(templateName);
|
|
@@ -298,8 +302,10 @@ async function resolveTemplateDirs(templateName) {
|
|
|
298
302
|
preferredTemplateDir: await fs.pathExists(packagedTemplateDir) ? packagedTemplateDir : workspaceTemplateDir
|
|
299
303
|
};
|
|
300
304
|
}
|
|
301
|
-
function shouldSkipTemplateFile(filePath) {
|
|
302
|
-
|
|
305
|
+
function shouldSkipTemplateFile(filePath, templateRoot) {
|
|
306
|
+
const relativePath = normalizeTemplateRelativePath(path.relative(templateRoot, filePath));
|
|
307
|
+
if (!relativePath) return false;
|
|
308
|
+
return relativePath === "node_modules" || relativePath.startsWith("node_modules/") || relativePath.includes("/node_modules/") || relativePath === ".weapp-vite" || relativePath.startsWith(".weapp-vite/") || relativePath.includes("/.weapp-vite/") || relativePath === "vite.config.ts.timestamp" || relativePath.endsWith("/vite.config.ts.timestamp") || relativePath === "dist" || relativePath.startsWith("dist/") || relativePath.includes("/dist/") || relativePath === "CHANGELOG.md" || relativePath.endsWith("/CHANGELOG.md") || relativePath === ".turbo" || relativePath.startsWith(".turbo/") || relativePath.includes("/.turbo/") || relativePath === ".DS_Store" || relativePath.endsWith("/.DS_Store");
|
|
303
309
|
}
|
|
304
310
|
function normalizeLines(value) {
|
|
305
311
|
return value.replace(CRLF_RE, "\n").split("\n");
|
|
@@ -317,7 +323,7 @@ function mergeGitignoreSource(existing, template) {
|
|
|
317
323
|
}
|
|
318
324
|
async function copyTemplateDir(sourceDir, fallbackDir, targetDir) {
|
|
319
325
|
const copyOptions = { filter(src) {
|
|
320
|
-
return !shouldSkipTemplateFile(src);
|
|
326
|
+
return !shouldSkipTemplateFile(src, sourceDir);
|
|
321
327
|
} };
|
|
322
328
|
try {
|
|
323
329
|
await fs.copy(sourceDir, targetDir, copyOptions);
|
package/package.json
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
+
"files.associations": {
|
|
3
|
+
"*.wxml": "html"
|
|
4
|
+
},
|
|
5
|
+
"html.customData": [
|
|
6
|
+
"./.weapp-vite/mini-program.html-data.json"
|
|
7
|
+
],
|
|
8
|
+
"tailwindCSS.experimental.classRegex": [
|
|
9
|
+
[
|
|
10
|
+
"clsx\\(([^)]*)\\)",
|
|
11
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"cn\\(([^)]*)\\)",
|
|
15
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"cva\\(([^)]*)\\)",
|
|
19
|
+
"[\"'`]([^\"'`]*).*?[\"'`]"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"cx\\(([^)]*)\\)",
|
|
23
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
24
|
+
]
|
|
25
|
+
],
|
|
26
|
+
"tailwindCSS.classAttributes": [
|
|
27
|
+
"class",
|
|
28
|
+
"className",
|
|
29
|
+
"ngClass",
|
|
30
|
+
"class:list",
|
|
31
|
+
"hover-class"
|
|
32
|
+
],
|
|
2
33
|
"tailwindCSS.includeLanguages": {
|
|
3
34
|
"wxml": "html"
|
|
4
35
|
}
|
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
+
"files.associations": {
|
|
3
|
+
"*.wxml": "html"
|
|
4
|
+
},
|
|
5
|
+
"html.customData": [
|
|
6
|
+
"./.weapp-vite/mini-program.html-data.json"
|
|
7
|
+
],
|
|
8
|
+
"tailwindCSS.experimental.classRegex": [
|
|
9
|
+
[
|
|
10
|
+
"clsx\\(([^)]*)\\)",
|
|
11
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"cn\\(([^)]*)\\)",
|
|
15
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"cva\\(([^)]*)\\)",
|
|
19
|
+
"[\"'`]([^\"'`]*).*?[\"'`]"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"cx\\(([^)]*)\\)",
|
|
23
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
24
|
+
]
|
|
25
|
+
],
|
|
26
|
+
"tailwindCSS.classAttributes": [
|
|
27
|
+
"class",
|
|
28
|
+
"className",
|
|
29
|
+
"ngClass",
|
|
30
|
+
"class:list",
|
|
31
|
+
"hover-class"
|
|
32
|
+
],
|
|
2
33
|
"tailwindCSS.includeLanguages": {
|
|
3
34
|
"wxml": "html"
|
|
4
35
|
}
|
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
+
"files.associations": {
|
|
3
|
+
"*.wxml": "html"
|
|
4
|
+
},
|
|
5
|
+
"html.customData": [
|
|
6
|
+
"./.weapp-vite/mini-program.html-data.json"
|
|
7
|
+
],
|
|
8
|
+
"tailwindCSS.experimental.classRegex": [
|
|
9
|
+
[
|
|
10
|
+
"clsx\\(([^)]*)\\)",
|
|
11
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"cn\\(([^)]*)\\)",
|
|
15
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"cva\\(([^)]*)\\)",
|
|
19
|
+
"[\"'`]([^\"'`]*).*?[\"'`]"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"cx\\(([^)]*)\\)",
|
|
23
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
24
|
+
]
|
|
25
|
+
],
|
|
26
|
+
"tailwindCSS.classAttributes": [
|
|
27
|
+
"class",
|
|
28
|
+
"className",
|
|
29
|
+
"ngClass",
|
|
30
|
+
"class:list",
|
|
31
|
+
"hover-class"
|
|
32
|
+
],
|
|
2
33
|
"tailwindCSS.includeLanguages": {
|
|
3
34
|
"wxml": "html"
|
|
4
35
|
}
|
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
+
"files.associations": {
|
|
3
|
+
"*.wxml": "html"
|
|
4
|
+
},
|
|
2
5
|
"html.customData": [
|
|
3
|
-
"
|
|
6
|
+
"./.weapp-vite/mini-program.html-data.json"
|
|
7
|
+
],
|
|
8
|
+
"tailwindCSS.experimental.classRegex": [
|
|
9
|
+
[
|
|
10
|
+
"clsx\\(([^)]*)\\)",
|
|
11
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"cn\\(([^)]*)\\)",
|
|
15
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"cva\\(([^)]*)\\)",
|
|
19
|
+
"[\"'`]([^\"'`]*).*?[\"'`]"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"cx\\(([^)]*)\\)",
|
|
23
|
+
"(?:'|\"|`)([^']*)(?:'|\"|`)"
|
|
24
|
+
]
|
|
25
|
+
],
|
|
26
|
+
"tailwindCSS.classAttributes": [
|
|
27
|
+
"class",
|
|
28
|
+
"className",
|
|
29
|
+
"ngClass",
|
|
30
|
+
"class:list",
|
|
31
|
+
"hover-class"
|
|
4
32
|
],
|
|
5
|
-
"vue.server.hybridMode": false,
|
|
6
|
-
"vue.tsserver.useWorkspaceTsdk": false,
|
|
7
33
|
"tailwindCSS.includeLanguages": {
|
|
8
34
|
"wxml": "html"
|
|
9
35
|
}
|