kirbyup 0.9.3 → 0.9.4
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 +11 -11
- package/dist/index.js +8 -8
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -56,22 +56,22 @@ var name, version;
|
|
|
56
56
|
var init_package = __esm({
|
|
57
57
|
"package.json"() {
|
|
58
58
|
name = "kirbyup";
|
|
59
|
-
version = "0.9.
|
|
59
|
+
version = "0.9.4";
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
// src/errors.ts
|
|
64
64
|
function handleError(error) {
|
|
65
65
|
if (error instanceof PrettyError) {
|
|
66
|
-
console.error(
|
|
66
|
+
console.error(import_nanocolors.default.red(error.message));
|
|
67
67
|
}
|
|
68
68
|
process.exitCode = 1;
|
|
69
69
|
}
|
|
70
|
-
var
|
|
70
|
+
var import_nanocolors, PrettyError;
|
|
71
71
|
var init_errors = __esm({
|
|
72
72
|
"src/errors.ts"() {
|
|
73
73
|
init_cjs_shims();
|
|
74
|
-
|
|
74
|
+
import_nanocolors = __toModule(require("nanocolors"));
|
|
75
75
|
PrettyError = class extends Error {
|
|
76
76
|
constructor(message) {
|
|
77
77
|
super(message);
|
|
@@ -121,8 +121,8 @@ var init_utils = __esm({
|
|
|
121
121
|
function log(message, type = "info") {
|
|
122
122
|
var _a;
|
|
123
123
|
const content = [
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
import_nanocolors2.default.gray(`[${name}]`),
|
|
125
|
+
import_nanocolors2.default[(_a = colorMap.get(type)) != null ? _a : "white"](message)
|
|
126
126
|
];
|
|
127
127
|
if (type === "error") {
|
|
128
128
|
console.error(...content);
|
|
@@ -130,11 +130,11 @@ function log(message, type = "info") {
|
|
|
130
130
|
console.log(...content);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
var
|
|
133
|
+
var import_nanocolors2, colorMap;
|
|
134
134
|
var init_log = __esm({
|
|
135
135
|
"src/log.ts"() {
|
|
136
136
|
init_cjs_shims();
|
|
137
|
-
|
|
137
|
+
import_nanocolors2 = __toModule(require("nanocolors"));
|
|
138
138
|
init_package();
|
|
139
139
|
colorMap = new Map([
|
|
140
140
|
["info", "yellow"],
|
|
@@ -211,26 +211,26 @@ async function build(_options) {
|
|
|
211
211
|
ignored
|
|
212
212
|
});
|
|
213
213
|
watcher.on("all", async (type, file) => {
|
|
214
|
-
log(`${type} ${
|
|
214
|
+
log(`${type} ${import_nanocolors3.default.gray(file)}`);
|
|
215
215
|
debouncedBuild();
|
|
216
216
|
});
|
|
217
217
|
};
|
|
218
218
|
await runViteBuild(options);
|
|
219
219
|
startWatcher();
|
|
220
220
|
}
|
|
221
|
-
var import_path, import_fs, import_vite, import_vite_plugin_vue2,
|
|
221
|
+
var import_path, import_fs, import_nanocolors3, import_vite, import_vite_plugin_vue2, outFile, normalizeOptions;
|
|
222
222
|
var init_src = __esm({
|
|
223
223
|
"src/index.ts"() {
|
|
224
224
|
init_cjs_shims();
|
|
225
225
|
import_path = __toModule(require("path"));
|
|
226
226
|
import_fs = __toModule(require("fs"));
|
|
227
|
+
import_nanocolors3 = __toModule(require("nanocolors"));
|
|
227
228
|
import_vite = __toModule(require("vite"));
|
|
228
229
|
import_vite_plugin_vue2 = __toModule(require("vite-plugin-vue2"));
|
|
229
230
|
init_errors();
|
|
230
231
|
init_utils();
|
|
231
232
|
init_log();
|
|
232
233
|
init_package();
|
|
233
|
-
import_chalk3 = __toModule(require("chalk"));
|
|
234
234
|
outFile = "index.js";
|
|
235
235
|
normalizeOptions = async (options) => {
|
|
236
236
|
if (!options.entry) {
|
package/dist/index.js
CHANGED
|
@@ -37,11 +37,12 @@ var importMetaUrlShim = typeof document === "undefined" ? new (require("url")).U
|
|
|
37
37
|
// src/index.ts
|
|
38
38
|
var import_path = __toModule(require("path"));
|
|
39
39
|
var import_fs = __toModule(require("fs"));
|
|
40
|
+
var import_nanocolors3 = __toModule(require("nanocolors"));
|
|
40
41
|
var import_vite = __toModule(require("vite"));
|
|
41
42
|
var import_vite_plugin_vue2 = __toModule(require("vite-plugin-vue2"));
|
|
42
43
|
|
|
43
44
|
// src/errors.ts
|
|
44
|
-
var
|
|
45
|
+
var import_nanocolors = __toModule(require("nanocolors"));
|
|
45
46
|
var PrettyError = class extends Error {
|
|
46
47
|
constructor(message) {
|
|
47
48
|
super(message);
|
|
@@ -55,7 +56,7 @@ var PrettyError = class extends Error {
|
|
|
55
56
|
};
|
|
56
57
|
function handleError(error) {
|
|
57
58
|
if (error instanceof PrettyError) {
|
|
58
|
-
console.error(
|
|
59
|
+
console.error(import_nanocolors.default.red(error.message));
|
|
59
60
|
}
|
|
60
61
|
process.exitCode = 1;
|
|
61
62
|
}
|
|
@@ -87,11 +88,11 @@ function debouncePromise(fn, delay, onError) {
|
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
// src/log.ts
|
|
90
|
-
var
|
|
91
|
+
var import_nanocolors2 = __toModule(require("nanocolors"));
|
|
91
92
|
|
|
92
93
|
// package.json
|
|
93
94
|
var name = "kirbyup";
|
|
94
|
-
var version = "0.9.
|
|
95
|
+
var version = "0.9.4";
|
|
95
96
|
|
|
96
97
|
// src/log.ts
|
|
97
98
|
var colorMap = new Map([
|
|
@@ -102,8 +103,8 @@ var colorMap = new Map([
|
|
|
102
103
|
function log(message, type = "info") {
|
|
103
104
|
var _a;
|
|
104
105
|
const content = [
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
import_nanocolors2.default.gray(`[${name}]`),
|
|
107
|
+
import_nanocolors2.default[(_a = colorMap.get(type)) != null ? _a : "white"](message)
|
|
107
108
|
];
|
|
108
109
|
if (type === "error") {
|
|
109
110
|
console.error(...content);
|
|
@@ -113,7 +114,6 @@ function log(message, type = "info") {
|
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
// src/index.ts
|
|
116
|
-
var import_chalk3 = __toModule(require("chalk"));
|
|
117
117
|
var outFile = "index.js";
|
|
118
118
|
async function runViteBuild(options) {
|
|
119
119
|
let result;
|
|
@@ -185,7 +185,7 @@ async function build(_options) {
|
|
|
185
185
|
ignored
|
|
186
186
|
});
|
|
187
187
|
watcher.on("all", async (type, file) => {
|
|
188
|
-
log(`${type} ${
|
|
188
|
+
log(`${type} ${import_nanocolors3.default.gray(file)}`);
|
|
189
189
|
debouncedBuild();
|
|
190
190
|
});
|
|
191
191
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kirbyup",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Zero-config bundler for Kirby Panel plugins",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"cac": "^6.7.3",
|
|
42
|
-
"chalk": "^4.1.2",
|
|
43
42
|
"chokidar": "^3.5.2",
|
|
43
|
+
"nanocolors": "^0.1.6",
|
|
44
44
|
"sass": "^1.42.1",
|
|
45
45
|
"vite": "^2.5.10",
|
|
46
46
|
"vite-plugin-vue2": "^1.8.2",
|