packitup 0.1.2 → 0.2.0
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/packitup.js +10 -1
- package/dist/packitup.mjs +10 -1
- package/package.json +1 -1
package/dist/packitup.js
CHANGED
|
@@ -252,6 +252,10 @@ function parseArgs() {
|
|
|
252
252
|
options[key] = true;
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
|
+
if (this.curr.startsWith('-')) {
|
|
256
|
+
options[this.curr.slice(1)] = true;
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
255
259
|
positional.push(this.curr);
|
|
256
260
|
this.next();
|
|
257
261
|
}
|
|
@@ -309,13 +313,18 @@ async function main() {
|
|
|
309
313
|
}
|
|
310
314
|
|
|
311
315
|
console.log(`🚀 Starting pack: ${input} → ${output}`);
|
|
312
|
-
|
|
313
316
|
outputBundle({
|
|
314
317
|
sourcePath: input,
|
|
315
318
|
projectName: options.name,
|
|
316
319
|
distPath: output,
|
|
317
320
|
umdFile: options.umd,
|
|
318
321
|
esmFile: options.esm,
|
|
322
|
+
move: options.move? pth => {
|
|
323
|
+
if (options['move-from'] && pth.startsWith(options['move-from'])) {
|
|
324
|
+
return pth.replace(options['move-from'], options['move-to'] || options['move-from']);
|
|
325
|
+
}
|
|
326
|
+
return pth;
|
|
327
|
+
} : void 0,
|
|
319
328
|
dontExport: (options['dont-export'] ?? '').split(' '),
|
|
320
329
|
esmTemplate: options['esm-template']
|
|
321
330
|
});
|
package/dist/packitup.mjs
CHANGED
|
@@ -252,6 +252,10 @@ function parseArgs() {
|
|
|
252
252
|
options[key] = true;
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
|
+
if (this.curr.startsWith('-')) {
|
|
256
|
+
options[this.curr.slice(1)] = true;
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
255
259
|
positional.push(this.curr);
|
|
256
260
|
this.next();
|
|
257
261
|
}
|
|
@@ -309,13 +313,18 @@ async function main() {
|
|
|
309
313
|
}
|
|
310
314
|
|
|
311
315
|
console.log(`🚀 Starting pack: ${input} → ${output}`);
|
|
312
|
-
|
|
313
316
|
outputBundle({
|
|
314
317
|
sourcePath: input,
|
|
315
318
|
projectName: options.name,
|
|
316
319
|
distPath: output,
|
|
317
320
|
umdFile: options.umd,
|
|
318
321
|
esmFile: options.esm,
|
|
322
|
+
move: options.move? pth => {
|
|
323
|
+
if (options['move-from'] && pth.startsWith(options['move-from'])) {
|
|
324
|
+
return pth.replace(options['move-from'], options['move-to'] || options['move-from']);
|
|
325
|
+
}
|
|
326
|
+
return pth;
|
|
327
|
+
} : void 0,
|
|
319
328
|
dontExport: (options['dont-export'] ?? '').split(' '),
|
|
320
329
|
esmTemplate: options['esm-template']
|
|
321
330
|
});
|