create-vuetify 2.4.0 → 2.5.1
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 +10 -3
- package/dist/index.mjs +626 -42
- package/package.json +3 -2
- package/template/javascript/base/vite.config.mjs +10 -7
- package/template/javascript/default/package.json +1 -1
- package/template/javascript/default/src/main.js +3 -0
- package/template/javascript/default/vite.config.mjs +10 -7
- package/template/typescript/base/vite.config.mts +16 -9
- package/template/typescript/default/package.json +1 -1
- package/template/typescript/default/src/main.ts +3 -0
- package/template/typescript/default/vite.config.mts +10 -7
- package/template/typescript/essentials/vite.config.mts +8 -5
package/README.md
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
# Vuetify Create
|
|
2
|
-
|
|
3
1
|
<p align="center">
|
|
4
|
-
<
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.vuetifyjs.com/docs/images/logos/vcreate-logo-dark.png">
|
|
4
|
+
<img alt="Vuetify One Logo" src="https://cdn.vuetifyjs.com/docs/images/logos/vcreate-logo-light.png" height="150">
|
|
5
|
+
</picture>
|
|
5
6
|
</p>
|
|
6
7
|
|
|
8
|
+
[](https://www.npmjs.com/package/create-vuetify)
|
|
9
|
+
[](https://npm.chart.dev/create-vuetify)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
|
|
12
|
+
Scaffold your next Vuetify application
|
|
13
|
+
|
|
7
14
|
## 💿 Getting Started
|
|
8
15
|
|
|
9
16
|
Using your terminal, navigate to your sites directory and run the following command:
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import { dirname as dirname3, join as join3, resolve as
|
|
2
|
+
import { dirname as dirname3, join as join3, resolve as resolve5 } from "path";
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
4
|
import { mkdirSync as mkdirSync2, rmSync, writeFileSync as writeFileSync2 } from "fs";
|
|
5
5
|
|
|
6
6
|
// src/utils/prompts.ts
|
|
7
|
-
import { join as join2, resolve as
|
|
7
|
+
import { join as join2, resolve as resolve3 } from "path";
|
|
8
8
|
import { existsSync as existsSync2, readdirSync } from "fs";
|
|
9
9
|
|
|
10
10
|
// src/utils/presets.ts
|
|
@@ -927,22 +927,590 @@ async function installDependencies(options = {}) {
|
|
|
927
927
|
});
|
|
928
928
|
}
|
|
929
929
|
|
|
930
|
-
//
|
|
931
|
-
import {
|
|
932
|
-
|
|
933
|
-
|
|
930
|
+
// node_modules/.pnpm/tinyexec@1.0.1/node_modules/tinyexec/dist/main.js
|
|
931
|
+
import { createRequire as __tinyexec_cr2 } from "node:module";
|
|
932
|
+
import { spawn as de2 } from "child_process";
|
|
933
|
+
import { normalize as fe2 } from "path";
|
|
934
|
+
import { cwd as he2 } from "process";
|
|
935
|
+
import {
|
|
936
|
+
delimiter as N2,
|
|
937
|
+
resolve as qt2,
|
|
938
|
+
dirname as It2
|
|
939
|
+
} from "path";
|
|
940
|
+
import { PassThrough as zt2 } from "stream";
|
|
941
|
+
import me2 from "readline";
|
|
942
|
+
var require3 = __tinyexec_cr2(import.meta.url);
|
|
943
|
+
var St2 = Object.create;
|
|
944
|
+
var $2 = Object.defineProperty;
|
|
945
|
+
var kt2 = Object.getOwnPropertyDescriptor;
|
|
946
|
+
var Tt2 = Object.getOwnPropertyNames;
|
|
947
|
+
var At2 = Object.getPrototypeOf;
|
|
948
|
+
var Rt2 = Object.prototype.hasOwnProperty;
|
|
949
|
+
var h2 = /* @__PURE__ */ ((t) => typeof require3 < "u" ? require3 : typeof Proxy < "u" ? new Proxy(t, {
|
|
950
|
+
get: (e, n) => (typeof require3 < "u" ? require3 : e)[n]
|
|
951
|
+
}) : t)(function(t) {
|
|
952
|
+
if (typeof require3 < "u") return require3.apply(this, arguments);
|
|
953
|
+
throw Error('Dynamic require of "' + t + '" is not supported');
|
|
954
|
+
});
|
|
955
|
+
var l2 = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
|
|
956
|
+
var $t2 = (t, e, n, r) => {
|
|
957
|
+
if (e && typeof e == "object" || typeof e == "function")
|
|
958
|
+
for (let s of Tt2(e))
|
|
959
|
+
!Rt2.call(t, s) && s !== n && $2(t, s, { get: () => e[s], enumerable: !(r = kt2(e, s)) || r.enumerable });
|
|
960
|
+
return t;
|
|
961
|
+
};
|
|
962
|
+
var Nt2 = (t, e, n) => (n = t != null ? St2(At2(t)) : {}, $t2(
|
|
963
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
964
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
965
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
966
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
967
|
+
e || !t || !t.__esModule ? $2(n, "default", { value: t, enumerable: true }) : n,
|
|
968
|
+
t
|
|
969
|
+
));
|
|
970
|
+
var W2 = l2((Se, H) => {
|
|
971
|
+
"use strict";
|
|
972
|
+
H.exports = z;
|
|
973
|
+
z.sync = Wt;
|
|
974
|
+
var j = h2("fs");
|
|
975
|
+
function Ht(t, e) {
|
|
976
|
+
var n = e.pathExt !== void 0 ? e.pathExt : process.env.PATHEXT;
|
|
977
|
+
if (!n || (n = n.split(";"), n.indexOf("") !== -1))
|
|
978
|
+
return true;
|
|
979
|
+
for (var r = 0; r < n.length; r++) {
|
|
980
|
+
var s = n[r].toLowerCase();
|
|
981
|
+
if (s && t.substr(-s.length).toLowerCase() === s)
|
|
982
|
+
return true;
|
|
983
|
+
}
|
|
984
|
+
return false;
|
|
985
|
+
}
|
|
986
|
+
function F(t, e, n) {
|
|
987
|
+
return !t.isSymbolicLink() && !t.isFile() ? false : Ht(e, n);
|
|
988
|
+
}
|
|
989
|
+
function z(t, e, n) {
|
|
990
|
+
j.stat(t, function(r, s) {
|
|
991
|
+
n(r, r ? false : F(s, t, e));
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
function Wt(t, e) {
|
|
995
|
+
return F(j.statSync(t), t, e);
|
|
996
|
+
}
|
|
997
|
+
});
|
|
998
|
+
var X2 = l2((ke, B) => {
|
|
999
|
+
"use strict";
|
|
1000
|
+
B.exports = K;
|
|
1001
|
+
K.sync = Dt;
|
|
1002
|
+
var D = h2("fs");
|
|
1003
|
+
function K(t, e, n) {
|
|
1004
|
+
D.stat(t, function(r, s) {
|
|
1005
|
+
n(r, r ? false : M(s, e));
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
function Dt(t, e) {
|
|
1009
|
+
return M(D.statSync(t), e);
|
|
1010
|
+
}
|
|
1011
|
+
function M(t, e) {
|
|
1012
|
+
return t.isFile() && Kt(t, e);
|
|
1013
|
+
}
|
|
1014
|
+
function Kt(t, e) {
|
|
1015
|
+
var n = t.mode, r = t.uid, s = t.gid, o = e.uid !== void 0 ? e.uid : process.getuid && process.getuid(), i = e.gid !== void 0 ? e.gid : process.getgid && process.getgid(), a = parseInt("100", 8), c = parseInt("010", 8), u = parseInt("001", 8), f = a | c, p = n & u || n & c && s === i || n & a && r === o || n & f && o === 0;
|
|
1016
|
+
return p;
|
|
1017
|
+
}
|
|
1018
|
+
});
|
|
1019
|
+
var U2 = l2((Ae, G) => {
|
|
1020
|
+
"use strict";
|
|
1021
|
+
var Te = h2("fs"), v;
|
|
1022
|
+
process.platform === "win32" || global.TESTING_WINDOWS ? v = W2() : v = X2();
|
|
1023
|
+
G.exports = y;
|
|
1024
|
+
y.sync = Mt;
|
|
1025
|
+
function y(t, e, n) {
|
|
1026
|
+
if (typeof e == "function" && (n = e, e = {}), !n) {
|
|
1027
|
+
if (typeof Promise != "function")
|
|
1028
|
+
throw new TypeError("callback not provided");
|
|
1029
|
+
return new Promise(function(r, s) {
|
|
1030
|
+
y(t, e || {}, function(o, i) {
|
|
1031
|
+
o ? s(o) : r(i);
|
|
1032
|
+
});
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
v(t, e || {}, function(r, s) {
|
|
1036
|
+
r && (r.code === "EACCES" || e && e.ignoreErrors) && (r = null, s = false), n(r, s);
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
function Mt(t, e) {
|
|
1040
|
+
try {
|
|
1041
|
+
return v.sync(t, e || {});
|
|
1042
|
+
} catch (n) {
|
|
1043
|
+
if (e && e.ignoreErrors || n.code === "EACCES")
|
|
1044
|
+
return false;
|
|
1045
|
+
throw n;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
});
|
|
1049
|
+
var et2 = l2((Re, tt) => {
|
|
1050
|
+
"use strict";
|
|
1051
|
+
var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Y = h2("path"), Bt = g ? ";" : ":", V = U2(), J = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), Q = (t, e) => {
|
|
1052
|
+
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
1053
|
+
// windows always checks the cwd first
|
|
1054
|
+
...g ? [process.cwd()] : [],
|
|
1055
|
+
...(e.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
1056
|
+
"").split(n)
|
|
1057
|
+
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
1058
|
+
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
1059
|
+
pathEnv: r,
|
|
1060
|
+
pathExt: o,
|
|
1061
|
+
pathExtExe: s
|
|
1062
|
+
};
|
|
1063
|
+
}, Z = (t, e, n) => {
|
|
1064
|
+
typeof e == "function" && (n = e, e = {}), e || (e = {});
|
|
1065
|
+
let { pathEnv: r, pathExt: s, pathExtExe: o } = Q(t, e), i = [], a = (u) => new Promise((f, p) => {
|
|
1066
|
+
if (u === r.length)
|
|
1067
|
+
return e.all && i.length ? f(i) : p(J(t));
|
|
1068
|
+
let d = r[u], w = /^".*"$/.test(d) ? d.slice(1, -1) : d, m = Y.join(w, t), b = !w && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + m : m;
|
|
1069
|
+
f(c(b, u, 0));
|
|
1070
|
+
}), c = (u, f, p) => new Promise((d, w) => {
|
|
1071
|
+
if (p === s.length)
|
|
1072
|
+
return d(a(f + 1));
|
|
1073
|
+
let m = s[p];
|
|
1074
|
+
V(u + m, { pathExt: o }, (b, Ot) => {
|
|
1075
|
+
if (!b && Ot)
|
|
1076
|
+
if (e.all)
|
|
1077
|
+
i.push(u + m);
|
|
1078
|
+
else
|
|
1079
|
+
return d(u + m);
|
|
1080
|
+
return d(c(u, f, p + 1));
|
|
1081
|
+
});
|
|
1082
|
+
});
|
|
1083
|
+
return n ? a(0).then((u) => n(null, u), n) : a(0);
|
|
1084
|
+
}, Xt = (t, e) => {
|
|
1085
|
+
e = e || {};
|
|
1086
|
+
let { pathEnv: n, pathExt: r, pathExtExe: s } = Q(t, e), o = [];
|
|
1087
|
+
for (let i = 0; i < n.length; i++) {
|
|
1088
|
+
let a = n[i], c = /^".*"$/.test(a) ? a.slice(1, -1) : a, u = Y.join(c, t), f = !c && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + u : u;
|
|
1089
|
+
for (let p = 0; p < r.length; p++) {
|
|
1090
|
+
let d = f + r[p];
|
|
1091
|
+
try {
|
|
1092
|
+
if (V.sync(d, { pathExt: s }))
|
|
1093
|
+
if (e.all)
|
|
1094
|
+
o.push(d);
|
|
1095
|
+
else
|
|
1096
|
+
return d;
|
|
1097
|
+
} catch {
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
if (e.all && o.length)
|
|
1102
|
+
return o;
|
|
1103
|
+
if (e.nothrow)
|
|
1104
|
+
return null;
|
|
1105
|
+
throw J(t);
|
|
1106
|
+
};
|
|
1107
|
+
tt.exports = Z;
|
|
1108
|
+
Z.sync = Xt;
|
|
1109
|
+
});
|
|
1110
|
+
var rt2 = l2(($e, _) => {
|
|
1111
|
+
"use strict";
|
|
1112
|
+
var nt = (t = {}) => {
|
|
1113
|
+
let e = t.env || process.env;
|
|
1114
|
+
return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(e).reverse().find((r) => r.toUpperCase() === "PATH") || "Path";
|
|
1115
|
+
};
|
|
1116
|
+
_.exports = nt;
|
|
1117
|
+
_.exports.default = nt;
|
|
1118
|
+
});
|
|
1119
|
+
var ct2 = l2((Ne, it) => {
|
|
1120
|
+
"use strict";
|
|
1121
|
+
var st = h2("path"), Gt = et2(), Ut = rt2();
|
|
1122
|
+
function ot(t, e) {
|
|
1123
|
+
let n = t.options.env || process.env, r = process.cwd(), s = t.options.cwd != null, o = s && process.chdir !== void 0 && !process.chdir.disabled;
|
|
1124
|
+
if (o)
|
|
1125
|
+
try {
|
|
1126
|
+
process.chdir(t.options.cwd);
|
|
1127
|
+
} catch {
|
|
1128
|
+
}
|
|
1129
|
+
let i;
|
|
1130
|
+
try {
|
|
1131
|
+
i = Gt.sync(t.command, {
|
|
1132
|
+
path: n[Ut({ env: n })],
|
|
1133
|
+
pathExt: e ? st.delimiter : void 0
|
|
1134
|
+
});
|
|
1135
|
+
} catch {
|
|
1136
|
+
} finally {
|
|
1137
|
+
o && process.chdir(r);
|
|
1138
|
+
}
|
|
1139
|
+
return i && (i = st.resolve(s ? t.options.cwd : "", i)), i;
|
|
1140
|
+
}
|
|
1141
|
+
function Yt(t) {
|
|
1142
|
+
return ot(t) || ot(t, true);
|
|
1143
|
+
}
|
|
1144
|
+
it.exports = Yt;
|
|
1145
|
+
});
|
|
1146
|
+
var ut2 = l2((qe, P) => {
|
|
1147
|
+
"use strict";
|
|
1148
|
+
var C = /([()\][%!^"`<>&|;, *?])/g;
|
|
1149
|
+
function Vt(t) {
|
|
1150
|
+
return t = t.replace(C, "^$1"), t;
|
|
1151
|
+
}
|
|
1152
|
+
function Jt(t, e) {
|
|
1153
|
+
return t = `${t}`, t = t.replace(/(\\*)"/g, '$1$1\\"'), t = t.replace(/(\\*)$/, "$1$1"), t = `"${t}"`, t = t.replace(C, "^$1"), e && (t = t.replace(C, "^$1")), t;
|
|
1154
|
+
}
|
|
1155
|
+
P.exports.command = Vt;
|
|
1156
|
+
P.exports.argument = Jt;
|
|
1157
|
+
});
|
|
1158
|
+
var lt2 = l2((Ie, at) => {
|
|
1159
|
+
"use strict";
|
|
1160
|
+
at.exports = /^#!(.*)/;
|
|
1161
|
+
});
|
|
1162
|
+
var dt2 = l2((Le, pt) => {
|
|
1163
|
+
"use strict";
|
|
1164
|
+
var Qt = lt2();
|
|
1165
|
+
pt.exports = (t = "") => {
|
|
1166
|
+
let e = t.match(Qt);
|
|
1167
|
+
if (!e)
|
|
1168
|
+
return null;
|
|
1169
|
+
let [n, r] = e[0].replace(/#! ?/, "").split(" "), s = n.split("/").pop();
|
|
1170
|
+
return s === "env" ? r : r ? `${s} ${r}` : s;
|
|
1171
|
+
};
|
|
1172
|
+
});
|
|
1173
|
+
var ht2 = l2((je, ft) => {
|
|
1174
|
+
"use strict";
|
|
1175
|
+
var O = h2("fs"), Zt = dt2();
|
|
1176
|
+
function te(t) {
|
|
1177
|
+
let n = Buffer.alloc(150), r;
|
|
1178
|
+
try {
|
|
1179
|
+
r = O.openSync(t, "r"), O.readSync(r, n, 0, 150, 0), O.closeSync(r);
|
|
1180
|
+
} catch {
|
|
1181
|
+
}
|
|
1182
|
+
return Zt(n.toString());
|
|
1183
|
+
}
|
|
1184
|
+
ft.exports = te;
|
|
1185
|
+
});
|
|
1186
|
+
var wt2 = l2((Fe, Et) => {
|
|
1187
|
+
"use strict";
|
|
1188
|
+
var ee = h2("path"), mt = ct2(), gt = ut2(), ne = ht2(), re = process.platform === "win32", se = /\.(?:com|exe)$/i, oe = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
1189
|
+
function ie(t) {
|
|
1190
|
+
t.file = mt(t);
|
|
1191
|
+
let e = t.file && ne(t.file);
|
|
1192
|
+
return e ? (t.args.unshift(t.file), t.command = e, mt(t)) : t.file;
|
|
1193
|
+
}
|
|
1194
|
+
function ce(t) {
|
|
1195
|
+
if (!re)
|
|
1196
|
+
return t;
|
|
1197
|
+
let e = ie(t), n = !se.test(e);
|
|
1198
|
+
if (t.options.forceShell || n) {
|
|
1199
|
+
let r = oe.test(e);
|
|
1200
|
+
t.command = ee.normalize(t.command), t.command = gt.command(t.command), t.args = t.args.map((o) => gt.argument(o, r));
|
|
1201
|
+
let s = [t.command].concat(t.args).join(" ");
|
|
1202
|
+
t.args = ["/d", "/s", "/c", `"${s}"`], t.command = process.env.comspec || "cmd.exe", t.options.windowsVerbatimArguments = true;
|
|
1203
|
+
}
|
|
1204
|
+
return t;
|
|
1205
|
+
}
|
|
1206
|
+
function ue(t, e, n) {
|
|
1207
|
+
e && !Array.isArray(e) && (n = e, e = null), e = e ? e.slice(0) : [], n = Object.assign({}, n);
|
|
1208
|
+
let r = {
|
|
1209
|
+
command: t,
|
|
1210
|
+
args: e,
|
|
1211
|
+
options: n,
|
|
1212
|
+
file: void 0,
|
|
1213
|
+
original: {
|
|
1214
|
+
command: t,
|
|
1215
|
+
args: e
|
|
1216
|
+
}
|
|
1217
|
+
};
|
|
1218
|
+
return n.shell ? r : ce(r);
|
|
1219
|
+
}
|
|
1220
|
+
Et.exports = ue;
|
|
1221
|
+
});
|
|
1222
|
+
var bt2 = l2((ze, vt) => {
|
|
1223
|
+
"use strict";
|
|
1224
|
+
var S = process.platform === "win32";
|
|
1225
|
+
function k(t, e) {
|
|
1226
|
+
return Object.assign(new Error(`${e} ${t.command} ENOENT`), {
|
|
1227
|
+
code: "ENOENT",
|
|
1228
|
+
errno: "ENOENT",
|
|
1229
|
+
syscall: `${e} ${t.command}`,
|
|
1230
|
+
path: t.command,
|
|
1231
|
+
spawnargs: t.args
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1234
|
+
function ae(t, e) {
|
|
1235
|
+
if (!S)
|
|
1236
|
+
return;
|
|
1237
|
+
let n = t.emit;
|
|
1238
|
+
t.emit = function(r, s) {
|
|
1239
|
+
if (r === "exit") {
|
|
1240
|
+
let o = xt(s, e, "spawn");
|
|
1241
|
+
if (o)
|
|
1242
|
+
return n.call(t, "error", o);
|
|
1243
|
+
}
|
|
1244
|
+
return n.apply(t, arguments);
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
function xt(t, e) {
|
|
1248
|
+
return S && t === 1 && !e.file ? k(e.original, "spawn") : null;
|
|
1249
|
+
}
|
|
1250
|
+
function le(t, e) {
|
|
1251
|
+
return S && t === 1 && !e.file ? k(e.original, "spawnSync") : null;
|
|
1252
|
+
}
|
|
1253
|
+
vt.exports = {
|
|
1254
|
+
hookChildProcess: ae,
|
|
1255
|
+
verifyENOENT: xt,
|
|
1256
|
+
verifyENOENTSync: le,
|
|
1257
|
+
notFoundError: k
|
|
1258
|
+
};
|
|
1259
|
+
});
|
|
1260
|
+
var Ct2 = l2((He, E) => {
|
|
1261
|
+
"use strict";
|
|
1262
|
+
var yt = h2("child_process"), T = wt2(), A = bt2();
|
|
1263
|
+
function _t(t, e, n) {
|
|
1264
|
+
let r = T(t, e, n), s = yt.spawn(r.command, r.args, r.options);
|
|
1265
|
+
return A.hookChildProcess(s, r), s;
|
|
1266
|
+
}
|
|
1267
|
+
function pe(t, e, n) {
|
|
1268
|
+
let r = T(t, e, n), s = yt.spawnSync(r.command, r.args, r.options);
|
|
1269
|
+
return s.error = s.error || A.verifyENOENTSync(s.status, r), s;
|
|
1270
|
+
}
|
|
1271
|
+
E.exports = _t;
|
|
1272
|
+
E.exports.spawn = _t;
|
|
1273
|
+
E.exports.sync = pe;
|
|
1274
|
+
E.exports._parse = T;
|
|
1275
|
+
E.exports._enoent = A;
|
|
1276
|
+
});
|
|
1277
|
+
var Lt2 = /^path$/i;
|
|
1278
|
+
var q2 = { key: "PATH", value: "" };
|
|
1279
|
+
function jt2(t) {
|
|
1280
|
+
for (let e in t) {
|
|
1281
|
+
if (!Object.prototype.hasOwnProperty.call(t, e) || !Lt2.test(e))
|
|
1282
|
+
continue;
|
|
1283
|
+
let n = t[e];
|
|
1284
|
+
return n ? { key: e, value: n } : q2;
|
|
1285
|
+
}
|
|
1286
|
+
return q2;
|
|
1287
|
+
}
|
|
1288
|
+
function Ft2(t, e) {
|
|
1289
|
+
let n = e.value.split(N2), r = t, s;
|
|
1290
|
+
do
|
|
1291
|
+
n.push(qt2(r, "node_modules", ".bin")), s = r, r = It2(r);
|
|
1292
|
+
while (r !== s);
|
|
1293
|
+
return { key: e.key, value: n.join(N2) };
|
|
1294
|
+
}
|
|
1295
|
+
function I2(t, e) {
|
|
1296
|
+
let n = {
|
|
1297
|
+
...process.env,
|
|
1298
|
+
...e
|
|
1299
|
+
}, r = Ft2(t, jt2(n));
|
|
1300
|
+
return n[r.key] = r.value, n;
|
|
1301
|
+
}
|
|
1302
|
+
var L2 = (t) => {
|
|
1303
|
+
let e = t.length, n = new zt2(), r = () => {
|
|
1304
|
+
--e === 0 && n.emit("end");
|
|
1305
|
+
};
|
|
1306
|
+
for (let s of t)
|
|
1307
|
+
s.pipe(n, { end: false }), s.on("end", r);
|
|
1308
|
+
return n;
|
|
1309
|
+
};
|
|
1310
|
+
var Pt2 = Nt2(Ct2(), 1);
|
|
1311
|
+
var x2 = class extends Error {
|
|
1312
|
+
result;
|
|
1313
|
+
output;
|
|
1314
|
+
get exitCode() {
|
|
1315
|
+
if (this.result.exitCode !== null)
|
|
1316
|
+
return this.result.exitCode;
|
|
1317
|
+
}
|
|
1318
|
+
constructor(e, n) {
|
|
1319
|
+
super(`Process exited with non-zero status (${e.exitCode})`), this.result = e, this.output = n;
|
|
1320
|
+
}
|
|
1321
|
+
};
|
|
1322
|
+
var ge2 = {
|
|
1323
|
+
timeout: void 0,
|
|
1324
|
+
persist: false
|
|
1325
|
+
};
|
|
1326
|
+
var Ee2 = {
|
|
1327
|
+
windowsHide: true
|
|
1328
|
+
};
|
|
1329
|
+
function we2(t, e) {
|
|
1330
|
+
return {
|
|
1331
|
+
command: fe2(t),
|
|
1332
|
+
args: e ?? []
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
function xe2(t) {
|
|
1336
|
+
let e = new AbortController();
|
|
1337
|
+
for (let n of t) {
|
|
1338
|
+
if (n.aborted)
|
|
1339
|
+
return e.abort(), n;
|
|
1340
|
+
let r = () => {
|
|
1341
|
+
e.abort(n.reason);
|
|
1342
|
+
};
|
|
1343
|
+
n.addEventListener("abort", r, {
|
|
1344
|
+
signal: e.signal
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
return e.signal;
|
|
1348
|
+
}
|
|
1349
|
+
var R2 = class {
|
|
1350
|
+
_process;
|
|
1351
|
+
_aborted = false;
|
|
1352
|
+
_options;
|
|
1353
|
+
_command;
|
|
1354
|
+
_args;
|
|
1355
|
+
_resolveClose;
|
|
1356
|
+
_processClosed;
|
|
1357
|
+
_thrownError;
|
|
1358
|
+
get process() {
|
|
1359
|
+
return this._process;
|
|
1360
|
+
}
|
|
1361
|
+
get pid() {
|
|
1362
|
+
return this._process?.pid;
|
|
1363
|
+
}
|
|
1364
|
+
get exitCode() {
|
|
1365
|
+
if (this._process && this._process.exitCode !== null)
|
|
1366
|
+
return this._process.exitCode;
|
|
1367
|
+
}
|
|
1368
|
+
constructor(e, n, r) {
|
|
1369
|
+
this._options = {
|
|
1370
|
+
...ge2,
|
|
1371
|
+
...r
|
|
1372
|
+
}, this._command = e, this._args = n ?? [], this._processClosed = new Promise((s) => {
|
|
1373
|
+
this._resolveClose = s;
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
kill(e) {
|
|
1377
|
+
return this._process?.kill(e) === true;
|
|
1378
|
+
}
|
|
1379
|
+
get aborted() {
|
|
1380
|
+
return this._aborted;
|
|
1381
|
+
}
|
|
1382
|
+
get killed() {
|
|
1383
|
+
return this._process?.killed === true;
|
|
1384
|
+
}
|
|
1385
|
+
pipe(e, n, r) {
|
|
1386
|
+
return be2(e, n, {
|
|
1387
|
+
...r,
|
|
1388
|
+
stdin: this
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
async *[Symbol.asyncIterator]() {
|
|
1392
|
+
let e = this._process;
|
|
1393
|
+
if (!e)
|
|
1394
|
+
return;
|
|
1395
|
+
let n = [];
|
|
1396
|
+
this._streamErr && n.push(this._streamErr), this._streamOut && n.push(this._streamOut);
|
|
1397
|
+
let r = L2(n), s = me2.createInterface({
|
|
1398
|
+
input: r
|
|
1399
|
+
});
|
|
1400
|
+
for await (let o of s)
|
|
1401
|
+
yield o.toString();
|
|
1402
|
+
if (await this._processClosed, e.removeAllListeners(), this._thrownError)
|
|
1403
|
+
throw this._thrownError;
|
|
1404
|
+
if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0)
|
|
1405
|
+
throw new x2(this);
|
|
1406
|
+
}
|
|
1407
|
+
async _waitForOutput() {
|
|
1408
|
+
let e = this._process;
|
|
1409
|
+
if (!e)
|
|
1410
|
+
throw new Error("No process was started");
|
|
1411
|
+
let n = "", r = "";
|
|
1412
|
+
if (this._streamOut)
|
|
1413
|
+
for await (let o of this._streamOut)
|
|
1414
|
+
r += o.toString();
|
|
1415
|
+
if (this._streamErr)
|
|
1416
|
+
for await (let o of this._streamErr)
|
|
1417
|
+
n += o.toString();
|
|
1418
|
+
if (await this._processClosed, this._options?.stdin && await this._options.stdin, e.removeAllListeners(), this._thrownError)
|
|
1419
|
+
throw this._thrownError;
|
|
1420
|
+
let s = {
|
|
1421
|
+
stderr: n,
|
|
1422
|
+
stdout: r,
|
|
1423
|
+
exitCode: this.exitCode
|
|
1424
|
+
};
|
|
1425
|
+
if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0)
|
|
1426
|
+
throw new x2(this, s);
|
|
1427
|
+
return s;
|
|
1428
|
+
}
|
|
1429
|
+
then(e, n) {
|
|
1430
|
+
return this._waitForOutput().then(e, n);
|
|
1431
|
+
}
|
|
1432
|
+
_streamOut;
|
|
1433
|
+
_streamErr;
|
|
1434
|
+
spawn() {
|
|
1435
|
+
let e = he2(), n = this._options, r = {
|
|
1436
|
+
...Ee2,
|
|
1437
|
+
...n.nodeOptions
|
|
1438
|
+
}, s = [];
|
|
1439
|
+
this._resetState(), n.timeout !== void 0 && s.push(AbortSignal.timeout(n.timeout)), n.signal !== void 0 && s.push(n.signal), n.persist === true && (r.detached = true), s.length > 0 && (r.signal = xe2(s)), r.env = I2(e, r.env);
|
|
1440
|
+
let { command: o, args: i } = we2(this._command, this._args), a = (0, Pt2._parse)(o, i, r), c = de2(
|
|
1441
|
+
a.command,
|
|
1442
|
+
a.args,
|
|
1443
|
+
a.options
|
|
1444
|
+
);
|
|
1445
|
+
if (c.stderr && (this._streamErr = c.stderr), c.stdout && (this._streamOut = c.stdout), this._process = c, c.once("error", this._onError), c.once("close", this._onClose), n.stdin !== void 0 && c.stdin && n.stdin.process) {
|
|
1446
|
+
let { stdout: u } = n.stdin.process;
|
|
1447
|
+
u && u.pipe(c.stdin);
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
_resetState() {
|
|
1451
|
+
this._aborted = false, this._processClosed = new Promise((e) => {
|
|
1452
|
+
this._resolveClose = e;
|
|
1453
|
+
}), this._thrownError = void 0;
|
|
1454
|
+
}
|
|
1455
|
+
_onError = (e) => {
|
|
1456
|
+
if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
|
|
1457
|
+
this._aborted = true;
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
this._thrownError = e;
|
|
1461
|
+
};
|
|
1462
|
+
_onClose = () => {
|
|
1463
|
+
this._resolveClose && this._resolveClose();
|
|
1464
|
+
};
|
|
1465
|
+
};
|
|
1466
|
+
var ve2 = (t, e, n) => {
|
|
1467
|
+
let r = new R2(t, e, n);
|
|
1468
|
+
return r.spawn(), r;
|
|
1469
|
+
};
|
|
1470
|
+
var be2 = ve2;
|
|
1471
|
+
|
|
1472
|
+
// src/utils/cli/postinstall/pnpm.ts
|
|
1473
|
+
async function pnpmIgnored(root) {
|
|
1474
|
+
const pnpmVersion = (await ve2(`pnpm`, ["-v"], { nodeOptions: { cwd: root } })).stdout.trim();
|
|
934
1475
|
const [major] = pnpmVersion.split(".").map(Number);
|
|
935
1476
|
if (major && major >= 10) {
|
|
936
|
-
const detect2 =
|
|
1477
|
+
const detect2 = (await ve2("pnpm", ["ignored-builds"], { nodeOptions: { cwd: root } })).stdout;
|
|
937
1478
|
if (detect2.startsWith("Automatically ignored builds during installation:\n None")) return;
|
|
938
1479
|
return detect2;
|
|
939
1480
|
}
|
|
940
1481
|
}
|
|
1482
|
+
async function pnpm(root) {
|
|
1483
|
+
const detect2 = await pnpmIgnored(root);
|
|
1484
|
+
if (detect2) console.warn(detect2);
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
// src/utils/cli/preinstall/yarn.ts
|
|
1488
|
+
import { appendFileSync } from "node:fs";
|
|
1489
|
+
import { resolve as resolve2 } from "node:path";
|
|
1490
|
+
var templateToAppend = `
|
|
1491
|
+
packageExtensions:
|
|
1492
|
+
unplugin-vue-router@*:
|
|
1493
|
+
dependencies:
|
|
1494
|
+
"@vue/compiler-sfc": "*"
|
|
1495
|
+
`;
|
|
1496
|
+
async function yarnFile(root) {
|
|
1497
|
+
const pnpmVersion = (await ve2("yarn", ["-v"], { nodeOptions: { cwd: root } })).stdout.trim();
|
|
1498
|
+
const [major] = pnpmVersion.split(".").map(Number);
|
|
1499
|
+
if (major && major >= 2) {
|
|
1500
|
+
appendFileSync(resolve2(root, ".yarnrc.yml"), templateToAppend);
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
async function yarn(root) {
|
|
1504
|
+
await yarnFile(root);
|
|
1505
|
+
}
|
|
941
1506
|
|
|
942
1507
|
// src/utils/installDependencies.ts
|
|
943
1508
|
var userAgent = process.env.npm_config_user_agent ?? "";
|
|
944
1509
|
var packageManager = /bun/.test(userAgent) ? "bun" : "pnpm";
|
|
945
1510
|
async function installDependencies2(root = process.cwd(), manager = packageManager) {
|
|
1511
|
+
if (manager === "yarn") {
|
|
1512
|
+
await yarn(root);
|
|
1513
|
+
}
|
|
946
1514
|
await installDependencies({
|
|
947
1515
|
packageManager: manager,
|
|
948
1516
|
cwd: root,
|
|
@@ -951,12 +1519,10 @@ async function installDependencies2(root = process.cwd(), manager = packageManag
|
|
|
951
1519
|
console.error(
|
|
952
1520
|
`Failed to install dependencies using ${manager}.`
|
|
953
1521
|
);
|
|
954
|
-
}).then(() => {
|
|
955
|
-
if (manager === "pnpm") {
|
|
956
|
-
const detect2 = pnpmIgnored(root);
|
|
957
|
-
if (detect2) console.warn(detect2);
|
|
958
|
-
}
|
|
959
1522
|
});
|
|
1523
|
+
if (manager === "pnpm") {
|
|
1524
|
+
await pnpm(root);
|
|
1525
|
+
}
|
|
960
1526
|
}
|
|
961
1527
|
|
|
962
1528
|
// src/utils/prompts.ts
|
|
@@ -1005,7 +1571,7 @@ var initPrompts = async (context) => {
|
|
|
1005
1571
|
process.exit(1);
|
|
1006
1572
|
}
|
|
1007
1573
|
},
|
|
1008
|
-
message: (prev) => `The project path: ${
|
|
1574
|
+
message: (prev) => `The project path: ${resolve3(context.cwd, prev)} already exists, would you like to overwrite this directory?`
|
|
1009
1575
|
},
|
|
1010
1576
|
{
|
|
1011
1577
|
name: "usePreset",
|
|
@@ -1119,7 +1685,7 @@ import minimist from "minimist";
|
|
|
1119
1685
|
|
|
1120
1686
|
// src/utils/renderTemplate.ts
|
|
1121
1687
|
import { copyFileSync, mkdirSync, readdirSync as readdirSync2, readFileSync, statSync, writeFileSync } from "fs";
|
|
1122
|
-
import { basename as basename2, dirname as dirname2, resolve as
|
|
1688
|
+
import { basename as basename2, dirname as dirname2, resolve as resolve4 } from "path";
|
|
1123
1689
|
|
|
1124
1690
|
// src/utils/deepMerge.ts
|
|
1125
1691
|
var isObject = (v) => {
|
|
@@ -1151,11 +1717,11 @@ function mergePkg(source, destination) {
|
|
|
1151
1717
|
}
|
|
1152
1718
|
function renderDirectory(source, destination) {
|
|
1153
1719
|
mkdirSync(destination, { recursive: true });
|
|
1154
|
-
readdirSync2(source).forEach((path4) => renderTemplate(
|
|
1720
|
+
readdirSync2(source).forEach((path4) => renderTemplate(resolve4(source, path4), resolve4(destination, path4)));
|
|
1155
1721
|
}
|
|
1156
1722
|
function renderFile(source, destination) {
|
|
1157
1723
|
const filename = basename2(source);
|
|
1158
|
-
if (filename.startsWith("_")) destination =
|
|
1724
|
+
if (filename.startsWith("_")) destination = resolve4(dirname2(destination), filename.replace("_", "."));
|
|
1159
1725
|
if (filename === "package.json") mergePkg(source, destination);
|
|
1160
1726
|
else copyFileSync(source, destination);
|
|
1161
1727
|
}
|
|
@@ -1178,7 +1744,7 @@ import path from "path";
|
|
|
1178
1744
|
import { spawnSync } from "child_process";
|
|
1179
1745
|
import fs from "fs";
|
|
1180
1746
|
|
|
1181
|
-
// node_modules/.pnpm/package-manager-detector@1.
|
|
1747
|
+
// node_modules/.pnpm/package-manager-detector@1.2.0/node_modules/package-manager-detector/dist/commands.mjs
|
|
1182
1748
|
function npmRun(agent) {
|
|
1183
1749
|
return (args) => {
|
|
1184
1750
|
if (args.length > 1) {
|
|
@@ -1207,7 +1773,7 @@ var npm = {
|
|
|
1207
1773
|
"uninstall": ["npm", "uninstall", 0],
|
|
1208
1774
|
"global_uninstall": ["npm", "uninstall", "-g", 0]
|
|
1209
1775
|
};
|
|
1210
|
-
var
|
|
1776
|
+
var yarn2 = {
|
|
1211
1777
|
"agent": ["yarn", 0],
|
|
1212
1778
|
"run": ["yarn", "run", 0],
|
|
1213
1779
|
"install": ["yarn", "install", 0],
|
|
@@ -1222,7 +1788,7 @@ var yarn = {
|
|
|
1222
1788
|
"global_uninstall": ["yarn", "global", "remove", 0]
|
|
1223
1789
|
};
|
|
1224
1790
|
var yarnBerry = {
|
|
1225
|
-
...
|
|
1791
|
+
...yarn2,
|
|
1226
1792
|
"frozen": ["yarn", "install", "--immutable", 0],
|
|
1227
1793
|
"upgrade": ["yarn", "up", 0],
|
|
1228
1794
|
"upgrade-interactive": ["yarn", "up", "-i", 0],
|
|
@@ -1232,7 +1798,7 @@ var yarnBerry = {
|
|
|
1232
1798
|
"global": ["npm", "i", "-g", 0],
|
|
1233
1799
|
"global_uninstall": ["npm", "uninstall", "-g", 0]
|
|
1234
1800
|
};
|
|
1235
|
-
var
|
|
1801
|
+
var pnpm2 = {
|
|
1236
1802
|
"agent": ["pnpm", 0],
|
|
1237
1803
|
"run": ["pnpm", "run", 0],
|
|
1238
1804
|
"install": ["pnpm", "i", 0],
|
|
@@ -1276,12 +1842,12 @@ var deno = {
|
|
|
1276
1842
|
};
|
|
1277
1843
|
var COMMANDS = {
|
|
1278
1844
|
"npm": npm,
|
|
1279
|
-
"yarn":
|
|
1845
|
+
"yarn": yarn2,
|
|
1280
1846
|
"yarn@berry": yarnBerry,
|
|
1281
|
-
"pnpm":
|
|
1847
|
+
"pnpm": pnpm2,
|
|
1282
1848
|
// pnpm v6.x or below
|
|
1283
1849
|
"pnpm@6": {
|
|
1284
|
-
...
|
|
1850
|
+
...pnpm2,
|
|
1285
1851
|
run: npmRun("pnpm")
|
|
1286
1852
|
},
|
|
1287
1853
|
"bun": bun,
|
|
@@ -1376,7 +1942,7 @@ var versions = {
|
|
|
1376
1942
|
"@nuxt/fonts": "^0.11.1"
|
|
1377
1943
|
};
|
|
1378
1944
|
|
|
1379
|
-
// node_modules/.pnpm/package-manager-detector@1.
|
|
1945
|
+
// node_modules/.pnpm/package-manager-detector@1.2.0/node_modules/package-manager-detector/dist/constants.mjs
|
|
1380
1946
|
var AGENTS = [
|
|
1381
1947
|
"npm",
|
|
1382
1948
|
"yarn",
|
|
@@ -1391,6 +1957,7 @@ var LOCKS = {
|
|
|
1391
1957
|
"bun.lockb": "bun",
|
|
1392
1958
|
"deno.lock": "deno",
|
|
1393
1959
|
"pnpm-lock.yaml": "pnpm",
|
|
1960
|
+
"pnpm-workspace.yaml": "pnpm",
|
|
1394
1961
|
"yarn.lock": "yarn",
|
|
1395
1962
|
"package-lock.json": "npm",
|
|
1396
1963
|
"npm-shrinkwrap.json": "npm"
|
|
@@ -1411,13 +1978,13 @@ var INSTALL_METADATA = {
|
|
|
1411
1978
|
"bun.lockb": "bun"
|
|
1412
1979
|
};
|
|
1413
1980
|
|
|
1414
|
-
// node_modules/.pnpm/package-manager-detector@1.
|
|
1415
|
-
import fs2 from "node:fs";
|
|
1981
|
+
// node_modules/.pnpm/package-manager-detector@1.2.0/node_modules/package-manager-detector/dist/detect.mjs
|
|
1982
|
+
import fs2 from "node:fs/promises";
|
|
1416
1983
|
import path2 from "node:path";
|
|
1417
1984
|
import process3 from "node:process";
|
|
1418
|
-
function pathExists(path22, type) {
|
|
1985
|
+
async function pathExists(path22, type) {
|
|
1419
1986
|
try {
|
|
1420
|
-
const stat = fs2.
|
|
1987
|
+
const stat = await fs2.stat(path22);
|
|
1421
1988
|
return type === "file" ? stat.isFile() : stat.isDirectory();
|
|
1422
1989
|
} catch {
|
|
1423
1990
|
return false;
|
|
@@ -1435,7 +2002,7 @@ async function parsePackageJson(filepath, onUnknown) {
|
|
|
1435
2002
|
return !filepath || !pathExists(filepath, "file") ? null : await handlePackageManager(filepath, onUnknown);
|
|
1436
2003
|
}
|
|
1437
2004
|
async function detect(options = {}) {
|
|
1438
|
-
const { cwd: cwd2, strategies = ["lockfile", "packageManager-field"], onUnknown } = options;
|
|
2005
|
+
const { cwd: cwd2, strategies = ["lockfile", "packageManager-field", "devEngines-field"], onUnknown } = options;
|
|
1439
2006
|
for (const directory of lookup(cwd2)) {
|
|
1440
2007
|
for (const strategy of strategies) {
|
|
1441
2008
|
switch (strategy) {
|
|
@@ -1452,7 +2019,8 @@ async function detect(options = {}) {
|
|
|
1452
2019
|
}
|
|
1453
2020
|
break;
|
|
1454
2021
|
}
|
|
1455
|
-
case "packageManager-field":
|
|
2022
|
+
case "packageManager-field":
|
|
2023
|
+
case "devEngines-field": {
|
|
1456
2024
|
const result = await parsePackageJson(path2.join(directory, "package.json"), onUnknown);
|
|
1457
2025
|
if (result)
|
|
1458
2026
|
return result;
|
|
@@ -1474,18 +2042,34 @@ async function detect(options = {}) {
|
|
|
1474
2042
|
}
|
|
1475
2043
|
return null;
|
|
1476
2044
|
}
|
|
2045
|
+
function getNameAndVer(pkg) {
|
|
2046
|
+
const handelVer = (version) => version?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version;
|
|
2047
|
+
if (typeof pkg.packageManager === "string") {
|
|
2048
|
+
const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@");
|
|
2049
|
+
return { name, ver: handelVer(ver) };
|
|
2050
|
+
}
|
|
2051
|
+
if (typeof pkg.devEngines?.packageManager?.name === "string") {
|
|
2052
|
+
return {
|
|
2053
|
+
name: pkg.devEngines.packageManager.name,
|
|
2054
|
+
ver: handelVer(pkg.devEngines.packageManager.version)
|
|
2055
|
+
};
|
|
2056
|
+
}
|
|
2057
|
+
return void 0;
|
|
2058
|
+
}
|
|
1477
2059
|
async function handlePackageManager(filepath, onUnknown) {
|
|
1478
2060
|
try {
|
|
1479
|
-
const pkg = JSON.parse(await fs2.
|
|
2061
|
+
const pkg = JSON.parse(await fs2.readFile(filepath, "utf8"));
|
|
1480
2062
|
let agent;
|
|
1481
|
-
|
|
1482
|
-
|
|
2063
|
+
const nameAndVer = getNameAndVer(pkg);
|
|
2064
|
+
if (nameAndVer) {
|
|
2065
|
+
const name = nameAndVer.name;
|
|
2066
|
+
const ver = nameAndVer.ver;
|
|
1483
2067
|
let version = ver;
|
|
1484
|
-
if (name === "yarn" && Number.parseInt(ver) > 1) {
|
|
2068
|
+
if (name === "yarn" && ver && Number.parseInt(ver) > 1) {
|
|
1485
2069
|
agent = "yarn@berry";
|
|
1486
2070
|
version = "berry";
|
|
1487
2071
|
return { name, agent, version };
|
|
1488
|
-
} else if (name === "pnpm" && Number.parseInt(ver) < 7) {
|
|
2072
|
+
} else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) {
|
|
1489
2073
|
agent = "pnpm@6";
|
|
1490
2074
|
return { name, agent, version };
|
|
1491
2075
|
} else if (AGENTS.includes(name)) {
|
|
@@ -1818,8 +2402,8 @@ ${banner}
|
|
|
1818
2402
|
}
|
|
1819
2403
|
const preset = context.usePreset ?? usePreset;
|
|
1820
2404
|
if (preset.startsWith("nuxt-")) {
|
|
1821
|
-
const templateRoot =
|
|
1822
|
-
const templatePath =
|
|
2405
|
+
const templateRoot = resolve5(dirname3(fileURLToPath(import.meta.url)), "../template/typescript");
|
|
2406
|
+
const templatePath = resolve5(dirname3(fileURLToPath(import.meta.url)), "../template/typescript/nuxt");
|
|
1823
2407
|
await renderNuxtTemplate({
|
|
1824
2408
|
cwd: cwd2,
|
|
1825
2409
|
projectName,
|
|
@@ -1834,16 +2418,16 @@ ${banner}
|
|
|
1834
2418
|
});
|
|
1835
2419
|
} else {
|
|
1836
2420
|
mkdirSync2(projectRoot);
|
|
1837
|
-
writeFileSync2(
|
|
2421
|
+
writeFileSync2(resolve5(projectRoot, "package.json"), JSON.stringify({ name: projectName }, null, 2));
|
|
1838
2422
|
console.log("\n\u25CC Generating scaffold...");
|
|
1839
2423
|
const jsOrTs = useTypeScript ? "typescript" : "javascript";
|
|
1840
|
-
const templatePath =
|
|
1841
|
-
renderTemplate(
|
|
2424
|
+
const templatePath = resolve5(dirname3(fileURLToPath(import.meta.url)), "../template", jsOrTs);
|
|
2425
|
+
renderTemplate(resolve5(templatePath, "default"), projectRoot);
|
|
1842
2426
|
if (["base", "essentials"].includes(usePreset)) {
|
|
1843
|
-
renderTemplate(
|
|
2427
|
+
renderTemplate(resolve5(templatePath, "base"), projectRoot);
|
|
1844
2428
|
}
|
|
1845
2429
|
if (["essentials", "recommended"].includes(usePreset)) {
|
|
1846
|
-
renderTemplate(
|
|
2430
|
+
renderTemplate(resolve5(templatePath, "essentials"), projectRoot);
|
|
1847
2431
|
}
|
|
1848
2432
|
if (usePackageManager && installDeps) {
|
|
1849
2433
|
console.log(`\u25CC Installing dependencies with ${usePackageManager}...
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vuetify",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"author": "Elijah Kotyluk <elijah@elijahkotyluk.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,8 +30,9 @@
|
|
|
30
30
|
"kolorist": "^1.8.0",
|
|
31
31
|
"magicast": "^0.3.5",
|
|
32
32
|
"minimist": "^1.2.8",
|
|
33
|
-
"package-manager-detector": "^1.
|
|
33
|
+
"package-manager-detector": "^1.2.0",
|
|
34
34
|
"prompts": "^2.4.2",
|
|
35
|
+
"tinyexec": "^1.0.1",
|
|
35
36
|
"validate-npm-package-name": "^6.0.0"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Components from 'unplugin-vue-components/vite'
|
|
3
3
|
import Vue from '@vitejs/plugin-vue'
|
|
4
4
|
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
|
5
|
-
import
|
|
5
|
+
import Fonts from 'unplugin-fonts/vite'
|
|
6
6
|
import VueRouter from 'unplugin-vue-router/vite'
|
|
7
7
|
|
|
8
8
|
// Utilities
|
|
@@ -24,12 +24,15 @@ export default defineConfig({
|
|
|
24
24
|
},
|
|
25
25
|
}),
|
|
26
26
|
Components(),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
families: [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
Fonts({
|
|
28
|
+
fontsource: {
|
|
29
|
+
families: [
|
|
30
|
+
{
|
|
31
|
+
name: "Roboto",
|
|
32
|
+
weights: [100, 300, 400, 500, 700, 900],
|
|
33
|
+
styles: ["normal", "italic"],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
33
36
|
},
|
|
34
37
|
}),
|
|
35
38
|
],
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Components from 'unplugin-vue-components/vite'
|
|
3
3
|
import Vue from '@vitejs/plugin-vue'
|
|
4
4
|
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
|
5
|
-
import
|
|
5
|
+
import Fonts from 'unplugin-fonts/vite'
|
|
6
6
|
|
|
7
7
|
// Utilities
|
|
8
8
|
import { defineConfig } from 'vite'
|
|
@@ -17,12 +17,15 @@ export default defineConfig({
|
|
|
17
17
|
// https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
|
|
18
18
|
Vuetify(),
|
|
19
19
|
Components(),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
families: [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
Fonts({
|
|
21
|
+
fontsource: {
|
|
22
|
+
families: [
|
|
23
|
+
{
|
|
24
|
+
name: 'Roboto',
|
|
25
|
+
weights: [100, 300, 400, 500, 700, 900],
|
|
26
|
+
styles: ['normal', 'italic'],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
26
29
|
},
|
|
27
30
|
}),
|
|
28
31
|
],
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Components from 'unplugin-vue-components/vite'
|
|
3
3
|
import Vue from '@vitejs/plugin-vue'
|
|
4
4
|
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
|
5
|
-
import
|
|
5
|
+
import Fonts from 'unplugin-fonts/vite'
|
|
6
6
|
import VueRouter from 'unplugin-vue-router/vite'
|
|
7
7
|
|
|
8
8
|
// Utilities
|
|
@@ -12,7 +12,9 @@ import { fileURLToPath, URL } from 'node:url'
|
|
|
12
12
|
// https://vitejs.dev/config/
|
|
13
13
|
export default defineConfig({
|
|
14
14
|
plugins: [
|
|
15
|
-
VueRouter(
|
|
15
|
+
VueRouter({
|
|
16
|
+
dts: 'src/typed-router.d.ts',
|
|
17
|
+
}),
|
|
16
18
|
Vue({
|
|
17
19
|
template: { transformAssetUrls },
|
|
18
20
|
}),
|
|
@@ -23,13 +25,18 @@ export default defineConfig({
|
|
|
23
25
|
configFile: 'src/styles/settings.scss',
|
|
24
26
|
},
|
|
25
27
|
}),
|
|
26
|
-
Components(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
Components({
|
|
29
|
+
dts: 'src/components.d.ts',
|
|
30
|
+
}),
|
|
31
|
+
Fonts({
|
|
32
|
+
fontsource: {
|
|
33
|
+
families: [
|
|
34
|
+
{
|
|
35
|
+
name: "Roboto",
|
|
36
|
+
weights: [100, 300, 400, 500, 700, 900],
|
|
37
|
+
styles: ["normal", "italic"],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
33
40
|
},
|
|
34
41
|
}),
|
|
35
42
|
],
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Components from 'unplugin-vue-components/vite'
|
|
3
3
|
import Vue from '@vitejs/plugin-vue'
|
|
4
4
|
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
|
|
5
|
-
import
|
|
5
|
+
import Fonts from 'unplugin-fonts/vite'
|
|
6
6
|
|
|
7
7
|
// Utilities
|
|
8
8
|
import { defineConfig } from 'vite'
|
|
@@ -17,12 +17,15 @@ export default defineConfig({
|
|
|
17
17
|
// https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
|
|
18
18
|
Vuetify(),
|
|
19
19
|
Components(),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
families: [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
Fonts({
|
|
21
|
+
fontsource: {
|
|
22
|
+
families: [
|
|
23
|
+
{
|
|
24
|
+
name: 'Roboto',
|
|
25
|
+
weights: [100, 300, 400, 500, 700, 900],
|
|
26
|
+
styles: ['normal', 'italic'],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
26
29
|
},
|
|
27
30
|
}),
|
|
28
31
|
],
|
|
@@ -47,11 +47,14 @@ export default defineConfig({
|
|
|
47
47
|
},
|
|
48
48
|
}),
|
|
49
49
|
Fonts({
|
|
50
|
-
|
|
51
|
-
families: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
fontsource: {
|
|
51
|
+
families: [
|
|
52
|
+
{
|
|
53
|
+
name: 'Roboto',
|
|
54
|
+
weights: [100, 300, 400, 500, 700, 900],
|
|
55
|
+
styles: ['normal', 'italic'],
|
|
56
|
+
},
|
|
57
|
+
],
|
|
55
58
|
},
|
|
56
59
|
}),
|
|
57
60
|
],
|