jiek 1.1.9 → 1.1.11

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cli.cjs CHANGED
@@ -149,7 +149,7 @@ async function getSelectedProjectsGraph(filter = commander.program.getOptionValu
149
149
 
150
150
  var name = "jiek";
151
151
  var type = "module";
152
- var version = "1.1.9";
152
+ var version = "1.1.11";
153
153
  var description$1 = "YiJie's personal kits.";
154
154
  var bin = {
155
155
  jiek: "bin/jiek.js",
@@ -391,6 +391,8 @@ module.exports = require('jiek/rollup').template(${JSON.stringify(manifest, null
391
391
  const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href)));
392
392
  const description = `
393
393
  Build the package according to the 'exports' field in the package.json.
394
+ If you want to rewrite the rollup command options, you can pass the options after '--'.
395
+ e.g. \`jiek build -- --watch\`
394
396
  `.trim();
395
397
  function parseBoolean(v) {
396
398
  if (v === void 0)
@@ -412,6 +414,19 @@ commander.program.command("build").description(description).option("-o, --outdir
412
414
  noClean,
413
415
  onlyMin
414
416
  }) => {
417
+ let shouldPassThrough = false;
418
+ const passThroughOptions = commander.program.parseOptions(process.argv).unknown.reduce(
419
+ (acc, value) => {
420
+ if (shouldPassThrough) {
421
+ acc.push(value);
422
+ }
423
+ if (value === "--") {
424
+ shouldPassThrough = true;
425
+ }
426
+ return acc;
427
+ },
428
+ []
429
+ );
415
430
  actionRestore();
416
431
  const { build } = loadConfig();
417
432
  silent = silent ?? build?.silent ?? false;
@@ -467,7 +482,7 @@ commander.program.command("build").description(description).option("-o, --outdir
467
482
  if (tsRegisterName) {
468
483
  prefix = `node -r ${tsRegisterName} `;
469
484
  }
470
- const command = `${prefix}${rollupBinaryPath} --silent -c ${configFile}`;
485
+ const command = [`${prefix}${rollupBinaryPath} --silent -c ${configFile}`, ...passThroughOptions].join(" ");
471
486
  const child = execa.execaCommand(command, {
472
487
  ipc: true,
473
488
  cwd: dir,
package/dist/cli.js CHANGED
@@ -118,7 +118,7 @@ async function getSelectedProjectsGraph(filter = program.getOptionValue("filter"
118
118
 
119
119
  var name = "jiek";
120
120
  var type = "module";
121
- var version = "1.1.9";
121
+ var version = "1.1.11";
122
122
  var description$1 = "YiJie's personal kits.";
123
123
  var bin = {
124
124
  jiek: "bin/jiek.js",
@@ -360,6 +360,8 @@ module.exports = require('jiek/rollup').template(${JSON.stringify(manifest, null
360
360
  const require = createRequire(import.meta.url);
361
361
  const description = `
362
362
  Build the package according to the 'exports' field in the package.json.
363
+ If you want to rewrite the rollup command options, you can pass the options after '--'.
364
+ e.g. \`jiek build -- --watch\`
363
365
  `.trim();
364
366
  function parseBoolean(v) {
365
367
  if (v === void 0)
@@ -381,6 +383,19 @@ program.command("build").description(description).option("-o, --outdir <OUTDIR>"
381
383
  noClean,
382
384
  onlyMin
383
385
  }) => {
386
+ let shouldPassThrough = false;
387
+ const passThroughOptions = program.parseOptions(process.argv).unknown.reduce(
388
+ (acc, value) => {
389
+ if (shouldPassThrough) {
390
+ acc.push(value);
391
+ }
392
+ if (value === "--") {
393
+ shouldPassThrough = true;
394
+ }
395
+ return acc;
396
+ },
397
+ []
398
+ );
384
399
  actionRestore();
385
400
  const { build } = loadConfig();
386
401
  silent = silent ?? build?.silent ?? false;
@@ -436,7 +451,7 @@ program.command("build").description(description).option("-o, --outdir <OUTDIR>"
436
451
  if (tsRegisterName) {
437
452
  prefix = `node -r ${tsRegisterName} `;
438
453
  }
439
- const command = `${prefix}${rollupBinaryPath} --silent -c ${configFile}`;
454
+ const command = [`${prefix}${rollupBinaryPath} --silent -c ${configFile}`, ...passThroughOptions].join(" ");
440
455
  const child = execaCommand(command, {
441
456
  ipc: true,
442
457
  cwd: dir,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jiek",
3
3
  "type": "module",
4
- "version": "1.1.9",
4
+ "version": "1.1.11",
5
5
  "description": "YiJie's personal kits.",
6
6
  "bin": {
7
7
  "jiek": "bin/jiek.js",
@@ -35,6 +35,8 @@ const require = createRequire(import.meta.url)
35
35
 
36
36
  const description = `
37
37
  Build the package according to the 'exports' field in the package.json.
38
+ If you want to rewrite the rollup command options, you can pass the options after '--'.
39
+ e.g. \`jiek build -- --watch\`
38
40
  `.trim()
39
41
 
40
42
  interface BuildOptions extends Record<string, unknown> {
@@ -91,6 +93,23 @@ program
91
93
  noClean,
92
94
  onlyMin: onlyMin
93
95
  }: BuildOptions) => {
96
+ let shouldPassThrough = false
97
+
98
+ const passThroughOptions = program
99
+ .parseOptions(process.argv)
100
+ .unknown
101
+ .reduce(
102
+ (acc, value) => {
103
+ if (shouldPassThrough) {
104
+ acc.push(value)
105
+ }
106
+ if (value === '--') {
107
+ shouldPassThrough = true
108
+ }
109
+ return acc
110
+ },
111
+ [] as string[]
112
+ )
94
113
  actionRestore()
95
114
  const { build } = loadConfig()
96
115
  silent = silent ?? build?.silent ?? false
@@ -154,7 +173,7 @@ program
154
173
  if (tsRegisterName) {
155
174
  prefix = `node -r ${tsRegisterName} `
156
175
  }
157
- const command = `${prefix}${rollupBinaryPath} --silent -c ${configFile}`
176
+ const command = [`${prefix}${rollupBinaryPath} --silent -c ${configFile}`, ...passThroughOptions].join(' ')
158
177
  const child = execaCommand(command, {
159
178
  ipc: true,
160
179
  cwd: dir,