MCPcopy Index your code
hub / github.com/developit/microbundle / cmd

Function cmd

src/prog.js:11–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9 const DEFAULT_FORMATS = ENABLE_MODERN ? 'modern,esm,cjs,umd' : 'esm,cjs,umd';
10
11 const cmd = type => (str, opts) => {
12 opts.watch = opts.watch || type === 'watch';
13
14 opts.entries = toArray(str || opts.entry).concat(opts._);
15
16 if (typeof opts.compress !== 'undefined') {
17 // Convert `--compress true/false/1/0` to booleans:
18 if (typeof opts.compress !== 'boolean') {
19 opts.compress = opts.compress !== 'false' && opts.compress !== '0';
20 }
21 } else {
22 // the default compress value is `true` for web, `false` for Node:
23 opts.compress = opts.target !== 'node';
24 }
25
26 handler(opts);
27 };
28
29 let prog = sade('microbundle');
30

Callers 1

prog.jsFile · 0.85

Calls 1

toArrayFunction · 0.85

Tested by

no test coverage detected