rollup 0.57.0 → 0.58.2

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +3 -11
  3. package/bin/rollup +591 -413
  4. package/dist/rollup.browser.js +19731 -18315
  5. package/dist/rollup.d.ts +341 -0
  6. package/dist/rollup.es.js +6582 -4875
  7. package/dist/rollup.js +6581 -4874
  8. package/dist/typings/Chunk.d.ts +37 -25
  9. package/dist/typings/ExternalModule.d.ts +3 -0
  10. package/dist/typings/Graph.d.ts +7 -6
  11. package/dist/typings/Module.d.ts +5 -1
  12. package/dist/typings/ast/nodes/ConditionalExpression.d.ts +4 -6
  13. package/dist/typings/ast/nodes/ExportDefaultDeclaration.d.ts +0 -1
  14. package/dist/typings/ast/nodes/Identifier.d.ts +2 -2
  15. package/dist/typings/ast/nodes/Import.d.ts +5 -3
  16. package/dist/typings/ast/nodes/LogicalExpression.d.ts +8 -4
  17. package/dist/typings/ast/nodes/MemberExpression.d.ts +2 -2
  18. package/dist/typings/ast/nodes/ObjectExpression.d.ts +3 -0
  19. package/dist/typings/ast/nodes/SequenceExpression.d.ts +10 -2
  20. package/dist/typings/ast/variables/GlobalVariable.d.ts +0 -1
  21. package/dist/typings/chunk-optimization.d.ts +3 -0
  22. package/dist/typings/finalisers/amd.d.ts +2 -9
  23. package/dist/typings/finalisers/cjs.d.ts +2 -8
  24. package/dist/typings/finalisers/es.d.ts +2 -8
  25. package/dist/typings/finalisers/iife.d.ts +2 -8
  26. package/dist/typings/finalisers/index.d.ts +9 -4
  27. package/dist/typings/finalisers/shared/warnOnBuiltins.d.ts +3 -2
  28. package/dist/typings/finalisers/system.d.ts +2 -7
  29. package/dist/typings/finalisers/umd.d.ts +2 -8
  30. package/dist/typings/rollup/index.d.ts +36 -28
  31. package/dist/typings/utils/addons.d.ts +10 -0
  32. package/dist/typings/utils/blank.d.ts +1 -0
  33. package/dist/typings/utils/collapseSourcemaps.d.ts +2 -2
  34. package/dist/typings/utils/defaults.d.ts +1 -1
  35. package/dist/typings/utils/mergeOptions.d.ts +4 -1
  36. package/dist/typings/utils/relativeId.d.ts +2 -0
  37. package/dist/typings/utils/renderHelpers.d.ts +2 -0
  38. package/dist/typings/watch/index.d.ts +5 -2
  39. package/package.json +33 -32
  40. package/dist/typings/finalisers/shared/getGlobalNameMaker.d.ts +0 -4
  41. package/dist/typings/utils/flushTime.d.ts +0 -5
  42. package/dist/typings/utils/object.d.ts +0 -7
  43. package/typings/package.json.d.ts +0 -3
package/bin/rollup CHANGED
@@ -8,6 +8,7 @@ var path__default = _interopDefault(path);
8
8
  var module$1 = _interopDefault(require('module'));
9
9
  var os = _interopDefault(require('os'));
10
10
  var rollup = require('../dist/rollup.js');
11
+ var rollup__default = _interopDefault(rollup);
11
12
  var assert = _interopDefault(require('assert'));
12
13
  var events = _interopDefault(require('events'));
13
14
  var fs = require('fs');
@@ -249,9 +250,9 @@ function isNumber (x) {
249
250
  return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
250
251
  }
251
252
 
252
- var help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-v, --version Show version number\n-h, --help Show this help message\n-c, --config Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-w, --watch Watch files in bundle and rebuild on changes\n-i, --input Input (alternative to <entry file>)\n-o, --output.file <output> Output (if absent, prints to stdout)\n-f, --output.format [es] Type of output (amd, cjs, es, iife, umd)\n-e, --external Comma-separate list of module IDs to exclude\n-g, --globals Comma-separate list of `module ID:Global` pairs\n Any module IDs defined here are added to external\n-n, --name Name for UMD export\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-l, --legacy Support IE8\n--amd.id ID for AMD module (default is anonymous)\n--amd.define Function to use in place of `define`\n--no-strict Don't emit a `\"use strict\";` in the generated modules.\n--no-indent Don't indent result\n--environment <values> Settings passed to config file (see example)\n--no-conflict Generate a noConflict method for UMD globals\n--no-treeshake Disable tree-shaking\n--silent Don't print warnings\n--intro Content to insert at top of bundle (inside wrapper)\n--outro Content to insert at end of bundle (inside wrapper)\n--banner Content to insert at top of bundle (outside wrapper)\n--footer Content to insert at end of bundle (outside wrapper)\n--interop Include interop block (true by default)\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --output=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
253
+ var help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-v, --version Show version number\n-h, --help Show this help message\n-c, --config Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-w, --watch Watch files in bundle and rebuild on changes\n-i, --input Input (alternative to <entry file>)\n-o, --file <output> Output (if absent, prints to stdout)\n-f, --format [es] Type of output (amd, cjs, es, iife, umd)\n-e, --external Comma-separate list of module IDs to exclude\n-g, --globals Comma-separate list of `module ID:Global` pairs\n Any module IDs defined here are added to external\n-n, --name Name for UMD export\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-l, --legacy Support IE8\n--amd.id ID for AMD module (default is anonymous)\n--amd.define Function to use in place of `define`\n--no-strict Don't emit a `\"use strict\";` in the generated modules.\n--no-indent Don't indent result\n--environment <values> Settings passed to config file (see example)\n--no-conflict Generate a noConflict method for UMD globals\n--no-treeshake Disable tree-shaking\n--silent Don't print warnings\n--intro Content to insert at top of bundle (inside wrapper)\n--outro Content to insert at end of bundle (inside wrapper)\n--banner Content to insert at top of bundle (outside wrapper)\n--footer Content to insert at end of bundle (outside wrapper)\n--no-interop Do not include interop block\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --file=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
253
254
 
254
- var version = "0.57.0";
255
+ var version = "0.58.2";
255
256
 
256
257
  var modules = {};
257
258
 
@@ -294,6 +295,11 @@ var escapeStringRegexp = function (str) {
294
295
  return str.replace(matchOperatorsRe, '\\$&');
295
296
  };
296
297
 
298
+ var escapeStringRegexp$1 = /*#__PURE__*/Object.freeze({
299
+ default: escapeStringRegexp,
300
+ __moduleExports: escapeStringRegexp
301
+ });
302
+
297
303
  var colorName = {
298
304
  "aliceblue": [240, 248, 255],
299
305
  "antiquewhite": [250, 235, 215],
@@ -445,6 +451,13 @@ var colorName = {
445
451
  "yellowgreen": [154, 205, 50]
446
452
  };
447
453
 
454
+ var colorName$1 = /*#__PURE__*/Object.freeze({
455
+ default: colorName,
456
+ __moduleExports: colorName
457
+ });
458
+
459
+ var cssKeywords = ( colorName$1 && colorName ) || colorName$1;
460
+
448
461
  var conversions = createCommonjsModule(function (module) {
449
462
  /* MIT license */
450
463
 
@@ -454,9 +467,9 @@ var conversions = createCommonjsModule(function (module) {
454
467
  // do not use box values types (i.e. Number(), String(), etc.)
455
468
 
456
469
  var reverseKeywords = {};
457
- for (var key in colorName) {
458
- if (colorName.hasOwnProperty(key)) {
459
- reverseKeywords[colorName[key]] = key;
470
+ for (var key in cssKeywords) {
471
+ if (cssKeywords.hasOwnProperty(key)) {
472
+ reverseKeywords[cssKeywords[key]] = key;
460
473
  }
461
474
  }
462
475
 
@@ -629,9 +642,9 @@ convert.rgb.keyword = function (rgb) {
629
642
  var currentClosestDistance = Infinity;
630
643
  var currentClosestKeyword;
631
644
 
632
- for (var keyword in colorName) {
633
- if (colorName.hasOwnProperty(keyword)) {
634
- var value = colorName[keyword];
645
+ for (var keyword in cssKeywords) {
646
+ if (cssKeywords.hasOwnProperty(keyword)) {
647
+ var value = cssKeywords[keyword];
635
648
 
636
649
  // Compute comparative distance
637
650
  var distance = comparativeDistance(rgb, value);
@@ -648,7 +661,7 @@ convert.rgb.keyword = function (rgb) {
648
661
  };
649
662
 
650
663
  convert.keyword.rgb = function (keyword) {
651
- return colorName[keyword];
664
+ return cssKeywords[keyword];
652
665
  };
653
666
 
654
667
  convert.rgb.xyz = function (rgb) {
@@ -1324,6 +1337,28 @@ var conversions_13 = conversions.hcg;
1324
1337
  var conversions_14 = conversions.apple;
1325
1338
  var conversions_15 = conversions.gray;
1326
1339
 
1340
+ var conversions$1 = /*#__PURE__*/Object.freeze({
1341
+ default: conversions,
1342
+ __moduleExports: conversions,
1343
+ rgb: conversions_1,
1344
+ hsl: conversions_2,
1345
+ hsv: conversions_3,
1346
+ hwb: conversions_4,
1347
+ cmyk: conversions_5,
1348
+ xyz: conversions_6,
1349
+ lab: conversions_7,
1350
+ lch: conversions_8,
1351
+ hex: conversions_9,
1352
+ keyword: conversions_10,
1353
+ ansi16: conversions_11,
1354
+ ansi256: conversions_12,
1355
+ hcg: conversions_13,
1356
+ apple: conversions_14,
1357
+ gray: conversions_15
1358
+ });
1359
+
1360
+ var conversions$2 = ( conversions$1 && conversions ) || conversions$1;
1361
+
1327
1362
  /*
1328
1363
  this function routes a model to all other models.
1329
1364
 
@@ -1338,7 +1373,7 @@ var conversions_15 = conversions.gray;
1338
1373
  function buildGraph() {
1339
1374
  var graph = {};
1340
1375
  // https://jsperf.com/object-keys-vs-for-in-with-closure/3
1341
- var models = Object.keys(conversions);
1376
+ var models = Object.keys(conversions$2);
1342
1377
 
1343
1378
  for (var len = models.length, i = 0; i < len; i++) {
1344
1379
  graph[models[i]] = {
@@ -1361,7 +1396,7 @@ function deriveBFS(fromModel) {
1361
1396
 
1362
1397
  while (queue.length) {
1363
1398
  var current = queue.pop();
1364
- var adjacents = Object.keys(conversions[current]);
1399
+ var adjacents = Object.keys(conversions$2[current]);
1365
1400
 
1366
1401
  for (var len = adjacents.length, i = 0; i < len; i++) {
1367
1402
  var adjacent = adjacents[i];
@@ -1386,12 +1421,12 @@ function link(from, to) {
1386
1421
 
1387
1422
  function wrapConversion(toModel, graph) {
1388
1423
  var path$$1 = [graph[toModel].parent, toModel];
1389
- var fn = conversions[graph[toModel].parent][toModel];
1424
+ var fn = conversions$2[graph[toModel].parent][toModel];
1390
1425
 
1391
1426
  var cur = graph[toModel].parent;
1392
1427
  while (graph[cur].parent) {
1393
1428
  path$$1.unshift(graph[cur].parent);
1394
- fn = link(conversions[graph[cur].parent][cur], fn);
1429
+ fn = link(conversions$2[graph[cur].parent][cur], fn);
1395
1430
  cur = graph[cur].parent;
1396
1431
  }
1397
1432
 
@@ -1419,9 +1454,16 @@ var route = function (fromModel) {
1419
1454
  return conversion;
1420
1455
  };
1421
1456
 
1457
+ var route$1 = /*#__PURE__*/Object.freeze({
1458
+ default: route,
1459
+ __moduleExports: route
1460
+ });
1461
+
1462
+ var route$2 = ( route$1 && route ) || route$1;
1463
+
1422
1464
  var convert = {};
1423
1465
 
1424
- var models = Object.keys(conversions);
1466
+ var models = Object.keys(conversions$2);
1425
1467
 
1426
1468
  function wrapRaw(fn) {
1427
1469
  var wrappedFn = function (args) {
@@ -1479,10 +1521,10 @@ function wrapRounded(fn) {
1479
1521
  models.forEach(function (fromModel) {
1480
1522
  convert[fromModel] = {};
1481
1523
 
1482
- Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
1483
- Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
1524
+ Object.defineProperty(convert[fromModel], 'channels', {value: conversions$2[fromModel].channels});
1525
+ Object.defineProperty(convert[fromModel], 'labels', {value: conversions$2[fromModel].labels});
1484
1526
 
1485
- var routes = route(fromModel);
1527
+ var routes = route$2(fromModel);
1486
1528
  var routeModels = Object.keys(routes);
1487
1529
 
1488
1530
  routeModels.forEach(function (toModel) {
@@ -1495,21 +1537,28 @@ models.forEach(function (fromModel) {
1495
1537
 
1496
1538
  var colorConvert = convert;
1497
1539
 
1540
+ var colorConvert$1 = /*#__PURE__*/Object.freeze({
1541
+ default: colorConvert,
1542
+ __moduleExports: colorConvert
1543
+ });
1544
+
1545
+ var colorConvert$2 = ( colorConvert$1 && colorConvert ) || colorConvert$1;
1546
+
1498
1547
  var ansiStyles = createCommonjsModule(function (module) {
1499
1548
 
1500
1549
 
1501
1550
  const wrapAnsi16 = (fn, offset) => function () {
1502
- const code = fn.apply(colorConvert, arguments);
1551
+ const code = fn.apply(colorConvert$2, arguments);
1503
1552
  return `\u001B[${code + offset}m`;
1504
1553
  };
1505
1554
 
1506
1555
  const wrapAnsi256 = (fn, offset) => function () {
1507
- const code = fn.apply(colorConvert, arguments);
1556
+ const code = fn.apply(colorConvert$2, arguments);
1508
1557
  return `\u001B[${38 + offset};5;${code}m`;
1509
1558
  };
1510
1559
 
1511
1560
  const wrapAnsi16m = (fn, offset) => function () {
1512
- const rgb = fn.apply(colorConvert, arguments);
1561
+ const rgb = fn.apply(colorConvert$2, arguments);
1513
1562
  return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1514
1563
  };
1515
1564
 
@@ -1625,12 +1674,12 @@ function assembleStyles() {
1625
1674
  rgb: wrapAnsi16m(rgb2rgb, 10)
1626
1675
  };
1627
1676
 
1628
- for (let key of Object.keys(colorConvert)) {
1629
- if (typeof colorConvert[key] !== 'object') {
1677
+ for (let key of Object.keys(colorConvert$2)) {
1678
+ if (typeof colorConvert$2[key] !== 'object') {
1630
1679
  continue;
1631
1680
  }
1632
1681
 
1633
- const suite = colorConvert[key];
1682
+ const suite = colorConvert$2[key];
1634
1683
 
1635
1684
  if (key === 'ansi16') {
1636
1685
  key = 'ansi';
@@ -1662,6 +1711,11 @@ Object.defineProperty(module, 'exports', {
1662
1711
  });
1663
1712
  });
1664
1713
 
1714
+ var ansiStyles$1 = /*#__PURE__*/Object.freeze({
1715
+ default: ansiStyles,
1716
+ __moduleExports: ansiStyles
1717
+ });
1718
+
1665
1719
  var hasFlag = (flag, argv) => {
1666
1720
  argv = argv || process.argv;
1667
1721
  const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
@@ -1670,17 +1724,24 @@ var hasFlag = (flag, argv) => {
1670
1724
  return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
1671
1725
  };
1672
1726
 
1727
+ var hasFlag$1 = /*#__PURE__*/Object.freeze({
1728
+ default: hasFlag,
1729
+ __moduleExports: hasFlag
1730
+ });
1731
+
1732
+ var hasFlag$2 = ( hasFlag$1 && hasFlag ) || hasFlag$1;
1733
+
1673
1734
  const env = process.env;
1674
1735
 
1675
1736
  let forceColor;
1676
- if (hasFlag('no-color') ||
1677
- hasFlag('no-colors') ||
1678
- hasFlag('color=false')) {
1737
+ if (hasFlag$2('no-color') ||
1738
+ hasFlag$2('no-colors') ||
1739
+ hasFlag$2('color=false')) {
1679
1740
  forceColor = false;
1680
- } else if (hasFlag('color') ||
1681
- hasFlag('colors') ||
1682
- hasFlag('color=true') ||
1683
- hasFlag('color=always')) {
1741
+ } else if (hasFlag$2('color') ||
1742
+ hasFlag$2('colors') ||
1743
+ hasFlag$2('color=true') ||
1744
+ hasFlag$2('color=always')) {
1684
1745
  forceColor = true;
1685
1746
  }
1686
1747
  if ('FORCE_COLOR' in env) {
@@ -1705,21 +1766,17 @@ function supportsColor(stream) {
1705
1766
  return 0;
1706
1767
  }
1707
1768
 
1708
- if (hasFlag('color=16m') ||
1709
- hasFlag('color=full') ||
1710
- hasFlag('color=truecolor')) {
1769
+ if (hasFlag$2('color=16m') ||
1770
+ hasFlag$2('color=full') ||
1771
+ hasFlag$2('color=truecolor')) {
1711
1772
  return 3;
1712
1773
  }
1713
1774
 
1714
- if (hasFlag('color=256')) {
1775
+ if (hasFlag$2('color=256')) {
1715
1776
  return 2;
1716
1777
  }
1717
1778
 
1718
1779
  if (stream && !stream.isTTY && forceColor !== true) {
1719
- // VS code debugger doesn't have isTTY set
1720
- if (env.VSCODE_PID) {
1721
- return 1;
1722
- }
1723
1780
  return 0;
1724
1781
  }
1725
1782
 
@@ -1801,6 +1858,17 @@ var supportsColor_1 = {
1801
1858
  stdout: getSupportLevel(process.stdout),
1802
1859
  stderr: getSupportLevel(process.stderr)
1803
1860
  };
1861
+ var supportsColor_2 = supportsColor_1.supportsColor;
1862
+ var supportsColor_3 = supportsColor_1.stdout;
1863
+ var supportsColor_4 = supportsColor_1.stderr;
1864
+
1865
+ var supportsColor$1 = /*#__PURE__*/Object.freeze({
1866
+ default: supportsColor_1,
1867
+ __moduleExports: supportsColor_1,
1868
+ supportsColor: supportsColor_2,
1869
+ stdout: supportsColor_3,
1870
+ stderr: supportsColor_4
1871
+ });
1804
1872
 
1805
1873
  const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
1806
1874
  const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
@@ -1930,10 +1998,23 @@ var templates = (chalk, tmp) => {
1930
1998
  return chunks.join('');
1931
1999
  };
1932
2000
 
2001
+ var templates$1 = /*#__PURE__*/Object.freeze({
2002
+ default: templates,
2003
+ __moduleExports: templates
2004
+ });
2005
+
2006
+ var escapeStringRegexp$2 = ( escapeStringRegexp$1 && escapeStringRegexp ) || escapeStringRegexp$1;
2007
+
2008
+ var ansiStyles$2 = ( ansiStyles$1 && ansiStyles ) || ansiStyles$1;
2009
+
2010
+ var require$$0 = ( supportsColor$1 && supportsColor_1 ) || supportsColor$1;
2011
+
2012
+ var template = ( templates$1 && templates ) || templates$1;
2013
+
1933
2014
  var chalk = createCommonjsModule(function (module) {
1934
2015
 
1935
2016
 
1936
- const stdoutColor = supportsColor_1.stdout;
2017
+ const stdoutColor = require$$0.stdout;
1937
2018
 
1938
2019
 
1939
2020
 
@@ -1981,15 +2062,15 @@ function Chalk(options) {
1981
2062
 
1982
2063
  // Use bright blue on Windows as the normal blue color is illegible
1983
2064
  if (isSimpleWindowsTerm) {
1984
- ansiStyles.blue.open = '\u001B[94m';
2065
+ ansiStyles$2.blue.open = '\u001B[94m';
1985
2066
  }
1986
2067
 
1987
- for (const key of Object.keys(ansiStyles)) {
1988
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
2068
+ for (const key of Object.keys(ansiStyles$2)) {
2069
+ ansiStyles$2[key].closeRe = new RegExp(escapeStringRegexp$2(ansiStyles$2[key].close), 'g');
1989
2070
 
1990
2071
  styles[key] = {
1991
2072
  get() {
1992
- const codes = ansiStyles[key];
2073
+ const codes = ansiStyles$2[key];
1993
2074
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
1994
2075
  }
1995
2076
  };
@@ -2001,8 +2082,8 @@ styles.visible = {
2001
2082
  }
2002
2083
  };
2003
2084
 
2004
- ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
2005
- for (const model of Object.keys(ansiStyles.color.ansi)) {
2085
+ ansiStyles$2.color.closeRe = new RegExp(escapeStringRegexp$2(ansiStyles$2.color.close), 'g');
2086
+ for (const model of Object.keys(ansiStyles$2.color.ansi)) {
2006
2087
  if (skipModels.has(model)) {
2007
2088
  continue;
2008
2089
  }
@@ -2011,11 +2092,11 @@ for (const model of Object.keys(ansiStyles.color.ansi)) {
2011
2092
  get() {
2012
2093
  const level = this.level;
2013
2094
  return function () {
2014
- const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
2095
+ const open = ansiStyles$2.color[levelMapping[level]][model].apply(null, arguments);
2015
2096
  const codes = {
2016
2097
  open,
2017
- close: ansiStyles.color.close,
2018
- closeRe: ansiStyles.color.closeRe
2098
+ close: ansiStyles$2.color.close,
2099
+ closeRe: ansiStyles$2.color.closeRe
2019
2100
  };
2020
2101
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
2021
2102
  };
@@ -2023,8 +2104,8 @@ for (const model of Object.keys(ansiStyles.color.ansi)) {
2023
2104
  };
2024
2105
  }
2025
2106
 
2026
- ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
2027
- for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
2107
+ ansiStyles$2.bgColor.closeRe = new RegExp(escapeStringRegexp$2(ansiStyles$2.bgColor.close), 'g');
2108
+ for (const model of Object.keys(ansiStyles$2.bgColor.ansi)) {
2028
2109
  if (skipModels.has(model)) {
2029
2110
  continue;
2030
2111
  }
@@ -2034,11 +2115,11 @@ for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
2034
2115
  get() {
2035
2116
  const level = this.level;
2036
2117
  return function () {
2037
- const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
2118
+ const open = ansiStyles$2.bgColor[levelMapping[level]][model].apply(null, arguments);
2038
2119
  const codes = {
2039
2120
  open,
2040
- close: ansiStyles.bgColor.close,
2041
- closeRe: ansiStyles.bgColor.closeRe
2121
+ close: ansiStyles$2.bgColor.close,
2122
+ closeRe: ansiStyles$2.bgColor.closeRe
2042
2123
  };
2043
2124
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
2044
2125
  };
@@ -2112,9 +2193,9 @@ function applyStyle() {
2112
2193
  // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
2113
2194
  // see https://github.com/chalk/chalk/issues/58
2114
2195
  // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
2115
- const originalDim = ansiStyles.dim.open;
2196
+ const originalDim = ansiStyles$2.dim.open;
2116
2197
  if (isSimpleWindowsTerm && this.hasGrey) {
2117
- ansiStyles.dim.open = '';
2198
+ ansiStyles$2.dim.open = '';
2118
2199
  }
2119
2200
 
2120
2201
  for (const code of this._styles.slice().reverse()) {
@@ -2130,7 +2211,7 @@ function applyStyle() {
2130
2211
  }
2131
2212
 
2132
2213
  // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
2133
- ansiStyles.dim.open = originalDim;
2214
+ ansiStyles$2.dim.open = originalDim;
2134
2215
 
2135
2216
  return str;
2136
2217
  }
@@ -2150,7 +2231,7 @@ function chalkTag(chalk, strings) {
2150
2231
  parts.push(String(strings.raw[i]));
2151
2232
  }
2152
2233
 
2153
- return templates(chalk, parts.join(''));
2234
+ return template(chalk, parts.join(''));
2154
2235
  }
2155
2236
 
2156
2237
  Object.defineProperties(Chalk.prototype, styles);
@@ -2166,6 +2247,15 @@ function isAbsolute(path$$1) {
2166
2247
  return absolutePath.test(path$$1);
2167
2248
  }
2168
2249
 
2250
+ var jsExts = ['.js', '.mjs'];
2251
+ function nameWithoutExtension(name) {
2252
+ for (var _i = 0, jsExts_1 = jsExts; _i < jsExts_1.length; _i++) {
2253
+ var ext = jsExts_1[_i];
2254
+ if (name.endsWith(ext))
2255
+ return name.substr(0, name.length - ext.length);
2256
+ }
2257
+ return name;
2258
+ }
2169
2259
  function relativeId(id) {
2170
2260
  if (typeof process === 'undefined' || !isAbsolute(id))
2171
2261
  return id;
@@ -2223,47 +2313,49 @@ function deprecateOptions(options, deprecateConfig) {
2223
2313
  return deprecations;
2224
2314
  function deprecateInputOptions() {
2225
2315
  if (!options.input && options.entry)
2226
- deprecate('entry', 'input', false);
2316
+ deprecate('entry', 'input');
2317
+ if (options.dest)
2318
+ deprecateToOutputOption('dest', 'file');
2227
2319
  if (options.moduleName)
2228
- deprecate('moduleName', 'output.name', true);
2320
+ deprecateToOutputOption('moduleName', 'name');
2229
2321
  if (options.name)
2230
- deprecate('name', 'output.name', true);
2322
+ deprecateToOutputOption('name', 'name');
2231
2323
  if (options.extend)
2232
- deprecate('extend', 'output.extend', true);
2324
+ deprecateToOutputOption('extend', 'extend');
2233
2325
  if (options.globals)
2234
- deprecate('globals', 'output.globals', true);
2326
+ deprecateToOutputOption('globals', 'globals');
2235
2327
  if (options.indent)
2236
- deprecate('indent', 'output.indent', true);
2328
+ deprecateToOutputOption('indent', 'indent');
2237
2329
  if (options.noConflict)
2238
- deprecate('noConflict', 'output.noConflict', true);
2330
+ deprecateToOutputOption('noConflict', 'noConflict');
2239
2331
  if (options.paths)
2240
- deprecate('paths', 'output.paths', true);
2332
+ deprecateToOutputOption('paths', 'paths');
2241
2333
  if (options.sourcemap)
2242
- deprecate('sourcemap', 'output.sourcemap', true);
2334
+ deprecateToOutputOption('sourcemap', 'sourcemap');
2243
2335
  if (options.sourceMap)
2244
- deprecate('sourceMap', 'output.sourcemap', true);
2336
+ deprecateToOutputOption('sourceMap', 'sourcemap');
2245
2337
  if (options.sourceMapFile)
2246
- deprecate('sourceMapFile', 'output.sourcemapFile', true);
2338
+ deprecateToOutputOption('sourceMapFile', 'sourcemapFile');
2247
2339
  if (options.useStrict)
2248
- deprecate('useStrict', 'output.strict', true);
2340
+ deprecateToOutputOption('useStrict', 'strict');
2249
2341
  if (options.strict)
2250
- deprecate('strict', 'output.strict', true);
2342
+ deprecateToOutputOption('strict', 'strict');
2251
2343
  if (options.format)
2252
- deprecate('format', 'output.format', true);
2344
+ deprecateToOutputOption('format', 'format');
2253
2345
  if (options.banner)
2254
- deprecate('banner', 'output.banner', false);
2346
+ deprecateToOutputOption('banner', 'banner');
2255
2347
  if (options.footer)
2256
- deprecate('footer', 'output.footer', false);
2348
+ deprecateToOutputOption('footer', 'footer');
2257
2349
  if (options.intro)
2258
- deprecate('intro', 'output.intro', false);
2350
+ deprecateToOutputOption('intro', 'intro');
2259
2351
  if (options.outro)
2260
- deprecate('outro', 'output.outro', false);
2352
+ deprecateToOutputOption('outro', 'outro');
2261
2353
  if (options.interop)
2262
- deprecate('interop', 'output.interop', true);
2354
+ deprecateToOutputOption('interop', 'interop');
2263
2355
  if (options.freeze)
2264
- deprecate('freeze', 'output.freeze', true);
2356
+ deprecateToOutputOption('freeze', 'freeze');
2265
2357
  if (options.exports)
2266
- deprecate('exports', 'output.exports', true);
2358
+ deprecateToOutputOption('exports', 'exports');
2267
2359
  if (options.targets) {
2268
2360
  deprecations.push({ old: 'targets', new: 'output' });
2269
2361
  // as targets is an array and we need to merge other output options
@@ -2284,14 +2376,6 @@ function deprecateOptions(options, deprecateConfig) {
2284
2376
  }
2285
2377
  });
2286
2378
  }
2287
- else if (options.dest) {
2288
- deprecations.push({ old: 'dest', new: 'output.file' });
2289
- options.output = {
2290
- file: options.dest,
2291
- format: options.format
2292
- };
2293
- delete options.dest;
2294
- }
2295
2379
  if (options.pureExternalModules) {
2296
2380
  deprecations.push({
2297
2381
  old: 'pureExternalModules',
@@ -2313,22 +2397,29 @@ function deprecateOptions(options, deprecateConfig) {
2313
2397
  delete options.output.moduleId;
2314
2398
  }
2315
2399
  }
2316
- // a utility function to add deprecations for straightforward options
2317
- function deprecate(oldOption, newOption, shouldDelete) {
2400
+ function deprecate(oldOption, newOption) {
2318
2401
  deprecations.push({ new: newOption, old: oldOption });
2319
- if (newOption.indexOf('output') > -1) {
2320
- options.output = options.output || {};
2321
- options.output[newOption.replace(/output\./, '')] = options[oldOption];
2322
- }
2323
- else {
2402
+ if (!(newOption in options)) {
2324
2403
  options[newOption] = options[oldOption];
2325
2404
  }
2326
- if (shouldDelete)
2327
- delete options[oldOption];
2405
+ delete options[oldOption];
2406
+ }
2407
+ function deprecateToOutputOption(oldOption, newOption) {
2408
+ deprecations.push({ new: "output." + newOption, old: oldOption });
2409
+ options.output = options.output || {};
2410
+ if (!(newOption in options.output)) {
2411
+ options.output[newOption] = options[oldOption];
2412
+ }
2413
+ delete options[oldOption];
2328
2414
  }
2329
2415
  }
2330
2416
 
2331
- function normalizeObjectOptionValue(optionValue) {
2417
+ var createGetOption = function (config, command) { return function (name, defaultValue) {
2418
+ return command[name] !== undefined
2419
+ ? command[name]
2420
+ : config[name] !== undefined ? config[name] : defaultValue;
2421
+ }; };
2422
+ var normalizeObjectOptionValue = function (optionValue) {
2332
2423
  if (!optionValue) {
2333
2424
  return optionValue;
2334
2425
  }
@@ -2336,7 +2427,17 @@ function normalizeObjectOptionValue(optionValue) {
2336
2427
  return {};
2337
2428
  }
2338
2429
  return optionValue;
2339
- }
2430
+ };
2431
+ var getObjectOption = function (config, command, name) {
2432
+ var commandOption = normalizeObjectOptionValue(command[name]);
2433
+ var configOption = normalizeObjectOptionValue(config[name]);
2434
+ if (commandOption !== undefined) {
2435
+ return commandOption && configOption
2436
+ ? Object.assign({}, configOption, commandOption)
2437
+ : commandOption;
2438
+ }
2439
+ return configOption;
2440
+ };
2340
2441
  var defaultOnWarn = function (warning) {
2341
2442
  if (typeof warning === 'string') {
2342
2443
  console.warn(warning); // eslint-disable-line no-console
@@ -2345,148 +2446,157 @@ var defaultOnWarn = function (warning) {
2345
2446
  console.warn(warning.message); // eslint-disable-line no-console
2346
2447
  }
2347
2448
  };
2348
- function mergeOptions(_a) {
2349
- var config = _a.config, _b = _a.command, command = _b === void 0 ? {} : _b, deprecateConfig = _a.deprecateConfig, _c = _a.defaultOnWarnHandler, defaultOnWarnHandler = _c === void 0 ? defaultOnWarn : _c;
2350
- var deprecations = deprecate(config, command, deprecateConfig);
2351
- var getOption = function (config) { return function (name) {
2352
- return command[name] !== undefined ? command[name] : config[name];
2353
- }; };
2354
- var getInputOption = getOption(config);
2355
- var getOutputOption = getOption(config.output || {});
2356
- function getObjectOption(name) {
2357
- var commandOption = normalizeObjectOptionValue(command[name]);
2358
- var configOption = normalizeObjectOptionValue(config[name]);
2359
- if (commandOption !== undefined) {
2360
- return commandOption && configOption
2361
- ? Object.assign({}, configOption, commandOption)
2362
- : commandOption;
2449
+ var getOnWarn = function (config, command, defaultOnWarnHandler) {
2450
+ if (defaultOnWarnHandler === void 0) { defaultOnWarnHandler = defaultOnWarn; }
2451
+ return command.silent
2452
+ ? function () { }
2453
+ : config.onwarn
2454
+ ? function (warning) { return config.onwarn(warning, defaultOnWarnHandler); }
2455
+ : defaultOnWarnHandler;
2456
+ };
2457
+ var getExternal = function (config, command) {
2458
+ var configExternal = config.external;
2459
+ return typeof configExternal === 'function'
2460
+ ? function (id) {
2461
+ var rest = [];
2462
+ for (var _i = 1; _i < arguments.length; _i++) {
2463
+ rest[_i - 1] = arguments[_i];
2464
+ }
2465
+ return configExternal.apply(void 0, [id].concat(rest)) || command.external.indexOf(id) !== -1;
2363
2466
  }
2364
- return configOption;
2365
- }
2366
- var onwarn = config.onwarn;
2367
- var warn;
2368
- if (onwarn) {
2369
- warn = function (warning) { return onwarn(warning, defaultOnWarnHandler); };
2467
+ : (configExternal || []).concat(command.external);
2468
+ };
2469
+ var commandAliases = {
2470
+ c: 'config',
2471
+ e: 'external',
2472
+ f: 'format',
2473
+ g: 'globals',
2474
+ h: 'help',
2475
+ i: 'input',
2476
+ l: 'legacy',
2477
+ m: 'sourcemap',
2478
+ n: 'name',
2479
+ o: 'file',
2480
+ v: 'version',
2481
+ w: 'watch'
2482
+ };
2483
+ function mergeOptions(_a) {
2484
+ var _b = _a.config, config = _b === void 0 ? {} : _b, _c = _a.command, rawCommandOptions = _c === void 0 ? {} : _c, deprecateConfig = _a.deprecateConfig, defaultOnWarnHandler = _a.defaultOnWarnHandler;
2485
+ var deprecations = deprecate(config, rawCommandOptions, deprecateConfig);
2486
+ var command = getCommandOptions(rawCommandOptions);
2487
+ var inputOptions = getInputOptions(config, command, defaultOnWarnHandler);
2488
+ if (command.output) {
2489
+ Object.assign(command, command.output);
2370
2490
  }
2371
- else {
2372
- warn = defaultOnWarnHandler;
2491
+ var normalizedOutputOptions = ensureArray(config.output);
2492
+ if (normalizedOutputOptions.length === 0)
2493
+ normalizedOutputOptions.push({});
2494
+ var outputOptions = normalizedOutputOptions.map(function (singleOutputOptions) {
2495
+ return getOutputOptions(singleOutputOptions, command);
2496
+ });
2497
+ var unknownOptionErrors = [];
2498
+ var validInputOptions = Object.keys(inputOptions);
2499
+ addUnknownOptionErrors(unknownOptionErrors, Object.keys(config), validInputOptions, 'input option', /^output$/);
2500
+ var validOutputOptions = Object.keys(outputOptions[0]);
2501
+ addUnknownOptionErrors(unknownOptionErrors, outputOptions.reduce(function (allKeys, options) { return allKeys.concat(Object.keys(options)); }, []), validOutputOptions, 'output option');
2502
+ addUnknownOptionErrors(unknownOptionErrors, Object.keys(command), validInputOptions.concat(validOutputOptions, Object.keys(commandAliases), 'config', 'environment', 'silent'), 'CLI flag', /^_|output|(config.*)$/);
2503
+ return {
2504
+ inputOptions: inputOptions,
2505
+ outputOptions: outputOptions,
2506
+ deprecations: deprecations,
2507
+ optionError: unknownOptionErrors.length > 0 ? unknownOptionErrors.join('\n') : null
2508
+ };
2509
+ }
2510
+ function addUnknownOptionErrors(errors, options, validOptions, optionType, ignoredKeys) {
2511
+ if (ignoredKeys === void 0) { ignoredKeys = /$./; }
2512
+ var unknownOptions = options.filter(function (key) { return validOptions.indexOf(key) === -1 && !ignoredKeys.test(key); });
2513
+ if (unknownOptions.length > 0)
2514
+ errors.push("Unknown " + optionType + ": " + unknownOptions.join(', ') + ". Allowed options: " + validOptions.sort().join(', '));
2515
+ }
2516
+ function getCommandOptions(rawCommandOptions) {
2517
+ var command = Object.assign({}, rawCommandOptions);
2518
+ command.external = (rawCommandOptions.external || '').split(',');
2519
+ if (rawCommandOptions.globals) {
2520
+ command.globals = Object.create(null);
2521
+ rawCommandOptions.globals.split(',').forEach(function (str) {
2522
+ var names = str.split(':');
2523
+ command.globals[names[0]] = names[1];
2524
+ // Add missing Module IDs to external.
2525
+ if (command.external.indexOf(names[0]) === -1) {
2526
+ command.external.push(names[0]);
2527
+ }
2528
+ });
2373
2529
  }
2530
+ return command;
2531
+ }
2532
+ function getInputOptions(config, command, defaultOnWarnHandler) {
2533
+ if (command === void 0) { command = {}; }
2534
+ var getOption = createGetOption(config, command);
2374
2535
  var inputOptions = {
2375
2536
  acorn: config.acorn,
2376
2537
  acornInjectPlugins: config.acornInjectPlugins,
2377
- cache: getInputOption('cache'),
2538
+ cache: getOption('cache'),
2378
2539
  context: config.context,
2379
- experimentalCodeSplitting: getInputOption('experimentalCodeSplitting'),
2380
- experimentalDynamicImport: getInputOption('experimentalDynamicImport'),
2381
- experimentalPreserveModules: getInputOption('experimentalPreserveModules'),
2382
- input: getInputOption('input'),
2383
- legacy: getInputOption('legacy'),
2540
+ experimentalCodeSplitting: getOption('experimentalCodeSplitting'),
2541
+ experimentalDynamicImport: getOption('experimentalDynamicImport'),
2542
+ experimentalPreserveModules: getOption('experimentalPreserveModules'),
2543
+ external: getExternal(config, command),
2544
+ input: getOption('input'),
2545
+ manualChunks: getOption('manualChunks'),
2546
+ chunkGroupingSize: getOption('chunkGroupingSize', 5000),
2547
+ optimizeChunks: getOption('optimizeChunks'),
2384
2548
  moduleContext: config.moduleContext,
2385
- onwarn: warn,
2386
- perf: getInputOption('perf'),
2549
+ onwarn: getOnWarn(config, command, defaultOnWarnHandler),
2550
+ perf: getOption('perf', false),
2387
2551
  plugins: config.plugins,
2388
- preferConst: getInputOption('preferConst'),
2389
- preserveSymlinks: getInputOption('preserveSymlinks'),
2390
- treeshake: getObjectOption('treeshake'),
2552
+ preferConst: getOption('preferConst'),
2553
+ preserveSymlinks: getOption('preserveSymlinks'),
2554
+ treeshake: getObjectOption(config, command, 'treeshake'),
2391
2555
  watch: config.watch
2392
2556
  };
2393
- // legacy, to ensure e.g. commonjs plugin still works
2394
- inputOptions.entry = inputOptions.input;
2395
- var commandExternal = (command.external || '').split(',');
2396
- var configExternal = config.external;
2397
- if (command.globals) {
2398
- var globals_1 = Object.create(null);
2399
- command.globals.split(',').forEach(function (str) {
2400
- var names = str.split(':');
2401
- globals_1[names[0]] = names[1];
2402
- // Add missing Module IDs to external.
2403
- if (commandExternal.indexOf(names[0]) === -1) {
2404
- commandExternal.push(names[0]);
2405
- }
2406
- });
2407
- command.globals = globals_1;
2557
+ // legacy to make sure certain plugins still work
2558
+ if (Array.isArray(inputOptions.input)) {
2559
+ inputOptions.entry = inputOptions.input[0];
2408
2560
  }
2409
- if (typeof configExternal === 'function') {
2410
- inputOptions.external = function (id) {
2411
- var rest = [];
2412
- for (var _i = 1; _i < arguments.length; _i++) {
2413
- rest[_i - 1] = arguments[_i];
2414
- }
2415
- return configExternal.apply(void 0, [id].concat(rest)) || commandExternal.indexOf(id) !== -1;
2416
- };
2417
- }
2418
- else {
2419
- inputOptions.external = (configExternal || []).concat(commandExternal);
2420
- }
2421
- if (command.silent) {
2422
- inputOptions.onwarn = function () { };
2423
- }
2424
- // Make sure the CLI treats this the same way as when we are code-splitting
2425
- if (inputOptions.experimentalPreserveModules && !Array.isArray(inputOptions.input)) {
2426
- inputOptions.input = [inputOptions.input];
2427
- }
2428
- var baseOutputOptions = {
2429
- amd: Object.assign({}, config.amd, command.amd),
2430
- banner: getOutputOption('banner'),
2431
- dir: getOutputOption('dir'),
2432
- exports: getOutputOption('exports'),
2433
- extend: getOutputOption('extend'),
2434
- file: getOutputOption('file'),
2435
- footer: getOutputOption('footer'),
2436
- format: getOutputOption('format'),
2437
- freeze: getOutputOption('freeze'),
2438
- globals: getOutputOption('globals'),
2439
- indent: getOutputOption('indent'),
2440
- interop: getOutputOption('interop'),
2441
- intro: getOutputOption('intro'),
2442
- legacy: getOutputOption('legacy'),
2443
- name: getOutputOption('name'),
2444
- namespaceToStringTag: getOutputOption('namespaceToStringTag'),
2445
- noConflict: getOutputOption('noConflict'),
2446
- outro: getOutputOption('outro'),
2447
- paths: getOutputOption('paths'),
2448
- sourcemap: getOutputOption('sourcemap'),
2449
- sourcemapFile: getOutputOption('sourcemapFile'),
2450
- strict: getOutputOption('strict')
2451
- };
2452
- var mergedOutputOptions;
2453
- if (Array.isArray(config.output)) {
2454
- mergedOutputOptions = config.output.map(function (output) {
2455
- return Object.assign({}, output, command.output);
2456
- });
2457
- }
2458
- else if (config.output && command.output) {
2459
- mergedOutputOptions = [Object.assign({}, config.output, command.output)];
2561
+ else if (typeof inputOptions.input === 'object') {
2562
+ for (var name in inputOptions.input) {
2563
+ inputOptions.entry = inputOptions.input[name];
2564
+ break;
2565
+ }
2460
2566
  }
2461
2567
  else {
2462
- mergedOutputOptions =
2463
- command.output || config.output
2464
- ? ensureArray(command.output || config.output)
2465
- : [
2466
- {
2467
- file: command.output ? command.output.file : null,
2468
- format: command.output ? command.output.format : null
2469
- }
2470
- ];
2568
+ inputOptions.entry = inputOptions.input;
2471
2569
  }
2472
- var outputOptions = mergedOutputOptions.map(function (output) {
2473
- return Object.assign({}, baseOutputOptions, output);
2474
- });
2475
- // check for errors
2476
- var validKeys = Object.keys(inputOptions).concat(Object.keys(baseOutputOptions), [
2477
- 'pureExternalModules' // (backward compatibility) till everyone moves to treeshake.pureExternalModules
2478
- ]);
2479
- var outputOptionKeys = Array.isArray(config.output)
2480
- ? config.output.reduce(function (keys, o) { return keys.concat(Object.keys(o)); }, [])
2481
- : Object.keys(config.output || {});
2482
- var errors = Object.keys(config || {}).concat(outputOptionKeys).filter(function (k) { return k !== 'output' && validKeys.indexOf(k) === -1; });
2570
+ return inputOptions;
2571
+ }
2572
+ function getOutputOptions(config, command) {
2573
+ if (command === void 0) { command = {}; }
2574
+ var getOption = createGetOption(config, command);
2483
2575
  return {
2484
- inputOptions: inputOptions,
2485
- outputOptions: outputOptions,
2486
- deprecations: deprecations,
2487
- optionError: errors.length
2488
- ? "Unknown option found: " + errors.join(', ') + ". Allowed keys: " + validKeys.join(', ')
2489
- : null
2576
+ amd: Object.assign({}, config.amd, command.amd),
2577
+ banner: getOption('banner'),
2578
+ dir: getOption('dir'),
2579
+ chunkNames: getOption('chunkNames'),
2580
+ entryNames: getOption('entryNames'),
2581
+ exports: getOption('exports'),
2582
+ extend: getOption('extend'),
2583
+ file: getOption('file'),
2584
+ footer: getOption('footer'),
2585
+ format: getOption('format'),
2586
+ freeze: getOption('freeze'),
2587
+ globals: getOption('globals'),
2588
+ indent: getOption('indent', true),
2589
+ interop: getOption('interop', true),
2590
+ intro: getOption('intro'),
2591
+ legacy: getOption('legacy', false),
2592
+ name: getOption('name'),
2593
+ namespaceToStringTag: getOption('namespaceToStringTag'),
2594
+ noConflict: getOption('noConflict'),
2595
+ outro: getOption('outro'),
2596
+ paths: getOption('paths'),
2597
+ sourcemap: getOption('sourcemap'),
2598
+ sourcemapFile: getOption('sourcemapFile'),
2599
+ strict: getOption('strict', true)
2490
2600
  };
2491
2601
  }
2492
2602
  function deprecate(config, command, deprecateConfig) {
@@ -2504,16 +2614,16 @@ function deprecate(config, command, deprecateConfig) {
2504
2614
  if (typeof command.output === 'string') {
2505
2615
  deprecations.push({
2506
2616
  old: '--output',
2507
- new: '--output.file'
2617
+ new: '--file'
2508
2618
  });
2509
2619
  command.output = { file: command.output };
2510
2620
  }
2511
- if (command.format) {
2621
+ if (command.d) {
2512
2622
  deprecations.push({
2513
- old: '--format',
2514
- new: '--output.format'
2623
+ old: '-d',
2624
+ new: '--indent'
2515
2625
  });
2516
- (command.output || (command.output = {})).format = command.format;
2626
+ command.indent = command.d;
2517
2627
  }
2518
2628
  // config file
2519
2629
  deprecations.push.apply(deprecations, deprecateOptions(config, deprecateConfig));
@@ -2605,7 +2715,7 @@ var immediateHandlers = {
2605
2715
  },
2606
2716
  MIXED_EXPORTS: function () {
2607
2717
  title('Mixing named and default exports');
2608
- stderr("Consumers of your bundle will have to use bundle['default'] to access the default export, which may not be what you want. Use `exports: 'named'` to disable this warning");
2718
+ stderr("Consumers of your bundle will have to use bundle['default'] to access the default export, which may not be what you want. Use `output.exports: 'named'` to disable this warning");
2609
2719
  },
2610
2720
  EMPTY_BUNDLE: function () {
2611
2721
  title("Generated an empty bundle");
@@ -2778,7 +2888,8 @@ function loadConfigFile(configFile, commandOptions) {
2778
2888
  if (commandOptions === void 0) { commandOptions = {}; }
2779
2889
  var silent = commandOptions.silent || false;
2780
2890
  var warnings = batchWarnings();
2781
- return rollup.rollup({
2891
+ return rollup__default
2892
+ .rollup({
2782
2893
  input: configFile,
2783
2894
  external: function (id) {
2784
2895
  return (id[0] !== '.' && !path__default.isAbsolute(id)) || id.slice(-5, id.length) === '.json';
@@ -2859,6 +2970,11 @@ var parseMs = function (ms) {
2859
2970
  };
2860
2971
  };
2861
2972
 
2973
+ var parseMs$1 = /*#__PURE__*/Object.freeze({
2974
+ default: parseMs,
2975
+ __moduleExports: parseMs
2976
+ });
2977
+
2862
2978
  var addendum = "addenda";
2863
2979
  var aircraft = "aircraft";
2864
2980
  var alga = "algae";
@@ -3147,149 +3263,149 @@ var irregularPlurals = {
3147
3263
  "this": "these"
3148
3264
  };
3149
3265
 
3150
- var irregularPlurals$1 = Object.freeze({
3151
- addendum: addendum,
3152
- aircraft: aircraft,
3153
- alga: alga,
3154
- alumna: alumna,
3155
- alumnus: alumnus,
3156
- amoeba: amoeba,
3157
- analysis: analysis,
3158
- antenna: antenna,
3159
- antithesis: antithesis,
3160
- apex: apex,
3161
- appendix: appendix,
3162
- automaton: automaton,
3163
- axis: axis,
3164
- bacillus: bacillus,
3165
- bacterium: bacterium,
3166
- barracks: barracks,
3167
- basis: basis,
3168
- beau: beau,
3169
- bison: bison,
3170
- buffalo: buffalo,
3171
- bureau: bureau,
3172
- cactus: cactus,
3173
- calf: calf,
3174
- carp: carp,
3175
- census: census,
3176
- chassis: chassis,
3177
- cherub: cherub,
3178
- child: child,
3179
- cod: cod,
3180
- codex: codex,
3181
- concerto: concerto,
3182
- corpus: corpus,
3183
- crisis: crisis,
3184
- criterion: criterion,
3185
- curriculum: curriculum,
3186
- datum: datum,
3187
- deer: deer,
3188
- diagnosis: diagnosis,
3189
- die: die,
3190
- dwarf: dwarf,
3191
- echo: echo,
3192
- elf: elf,
3193
- elk: elk,
3194
- ellipsis: ellipsis,
3195
- embargo: embargo,
3196
- emphasis: emphasis,
3197
- erratum: erratum,
3198
- fez: fez,
3199
- firmware: firmware,
3200
- fish: fish,
3201
- focus: focus,
3202
- foot: foot,
3203
- formula: formula,
3204
- fungus: fungus,
3205
- gallows: gallows,
3206
- genus: genus,
3207
- goose: goose,
3208
- graffito: graffito,
3209
- grouse: grouse,
3210
- half: half,
3211
- hero: hero,
3212
- hoof: hoof,
3213
- hovercraft: hovercraft,
3214
- hypothesis: hypothesis,
3215
- index: index,
3216
- kakapo: kakapo,
3217
- knife: knife,
3218
- larva: larva,
3219
- leaf: leaf,
3220
- libretto: libretto,
3221
- life: life,
3222
- loaf: loaf,
3223
- locus: locus,
3224
- louse: louse,
3225
- man: man,
3226
- matrix: matrix,
3227
- means: means,
3228
- medium: medium,
3229
- memorandum: memorandum,
3230
- millennium: millennium,
3231
- minutia: minutia,
3232
- moose: moose,
3233
- mouse: mouse,
3234
- nebula: nebula,
3235
- nemesis: nemesis,
3236
- neurosis: neurosis,
3237
- news: news,
3238
- nucleus: nucleus,
3239
- oasis: oasis,
3240
- offspring: offspring,
3241
- opus: opus,
3242
- ovum: ovum,
3243
- ox: ox,
3244
- paralysis: paralysis,
3245
- parenthesis: parenthesis,
3246
- person: person,
3247
- phenomenon: phenomenon,
3248
- phylum: phylum,
3249
- pike: pike,
3250
- polyhedron: polyhedron,
3251
- potato: potato,
3252
- prognosis: prognosis,
3253
- quiz: quiz,
3254
- radius: radius,
3255
- referendum: referendum,
3256
- salmon: salmon,
3257
- scarf: scarf,
3258
- self: self$1,
3259
- series: series,
3260
- sheep: sheep,
3261
- shelf: shelf,
3262
- shrimp: shrimp,
3263
- spacecraft: spacecraft,
3264
- species: species,
3265
- spectrum: spectrum,
3266
- squid: squid,
3267
- stimulus: stimulus,
3268
- stratum: stratum,
3269
- swine: swine,
3270
- syllabus: syllabus,
3271
- symposium: symposium,
3272
- synopsis: synopsis,
3273
- synthesis: synthesis,
3274
- tableau: tableau,
3275
- that: that,
3276
- thesis: thesis,
3277
- thief: thief,
3278
- tomato: tomato,
3279
- tooth: tooth,
3280
- trout: trout,
3281
- tuna: tuna,
3282
- vertebra: vertebra,
3283
- vertex: vertex,
3284
- veto: veto,
3285
- vita: vita,
3286
- vortex: vortex,
3287
- watercraft: watercraft,
3288
- wharf: wharf,
3289
- wife: wife,
3290
- wolf: wolf,
3291
- woman: woman,
3292
- default: irregularPlurals
3266
+ var irregularPlurals$1 = /*#__PURE__*/Object.freeze({
3267
+ addendum: addendum,
3268
+ aircraft: aircraft,
3269
+ alga: alga,
3270
+ alumna: alumna,
3271
+ alumnus: alumnus,
3272
+ amoeba: amoeba,
3273
+ analysis: analysis,
3274
+ antenna: antenna,
3275
+ antithesis: antithesis,
3276
+ apex: apex,
3277
+ appendix: appendix,
3278
+ automaton: automaton,
3279
+ axis: axis,
3280
+ bacillus: bacillus,
3281
+ bacterium: bacterium,
3282
+ barracks: barracks,
3283
+ basis: basis,
3284
+ beau: beau,
3285
+ bison: bison,
3286
+ buffalo: buffalo,
3287
+ bureau: bureau,
3288
+ cactus: cactus,
3289
+ calf: calf,
3290
+ carp: carp,
3291
+ census: census,
3292
+ chassis: chassis,
3293
+ cherub: cherub,
3294
+ child: child,
3295
+ cod: cod,
3296
+ codex: codex,
3297
+ concerto: concerto,
3298
+ corpus: corpus,
3299
+ crisis: crisis,
3300
+ criterion: criterion,
3301
+ curriculum: curriculum,
3302
+ datum: datum,
3303
+ deer: deer,
3304
+ diagnosis: diagnosis,
3305
+ die: die,
3306
+ dwarf: dwarf,
3307
+ echo: echo,
3308
+ elf: elf,
3309
+ elk: elk,
3310
+ ellipsis: ellipsis,
3311
+ embargo: embargo,
3312
+ emphasis: emphasis,
3313
+ erratum: erratum,
3314
+ fez: fez,
3315
+ firmware: firmware,
3316
+ fish: fish,
3317
+ focus: focus,
3318
+ foot: foot,
3319
+ formula: formula,
3320
+ fungus: fungus,
3321
+ gallows: gallows,
3322
+ genus: genus,
3323
+ goose: goose,
3324
+ graffito: graffito,
3325
+ grouse: grouse,
3326
+ half: half,
3327
+ hero: hero,
3328
+ hoof: hoof,
3329
+ hovercraft: hovercraft,
3330
+ hypothesis: hypothesis,
3331
+ index: index,
3332
+ kakapo: kakapo,
3333
+ knife: knife,
3334
+ larva: larva,
3335
+ leaf: leaf,
3336
+ libretto: libretto,
3337
+ life: life,
3338
+ loaf: loaf,
3339
+ locus: locus,
3340
+ louse: louse,
3341
+ man: man,
3342
+ matrix: matrix,
3343
+ means: means,
3344
+ medium: medium,
3345
+ memorandum: memorandum,
3346
+ millennium: millennium,
3347
+ minutia: minutia,
3348
+ moose: moose,
3349
+ mouse: mouse,
3350
+ nebula: nebula,
3351
+ nemesis: nemesis,
3352
+ neurosis: neurosis,
3353
+ news: news,
3354
+ nucleus: nucleus,
3355
+ oasis: oasis,
3356
+ offspring: offspring,
3357
+ opus: opus,
3358
+ ovum: ovum,
3359
+ ox: ox,
3360
+ paralysis: paralysis,
3361
+ parenthesis: parenthesis,
3362
+ person: person,
3363
+ phenomenon: phenomenon,
3364
+ phylum: phylum,
3365
+ pike: pike,
3366
+ polyhedron: polyhedron,
3367
+ potato: potato,
3368
+ prognosis: prognosis,
3369
+ quiz: quiz,
3370
+ radius: radius,
3371
+ referendum: referendum,
3372
+ salmon: salmon,
3373
+ scarf: scarf,
3374
+ self: self$1,
3375
+ series: series,
3376
+ sheep: sheep,
3377
+ shelf: shelf,
3378
+ shrimp: shrimp,
3379
+ spacecraft: spacecraft,
3380
+ species: species,
3381
+ spectrum: spectrum,
3382
+ squid: squid,
3383
+ stimulus: stimulus,
3384
+ stratum: stratum,
3385
+ swine: swine,
3386
+ syllabus: syllabus,
3387
+ symposium: symposium,
3388
+ synopsis: synopsis,
3389
+ synthesis: synthesis,
3390
+ tableau: tableau,
3391
+ that: that,
3392
+ thesis: thesis,
3393
+ thief: thief,
3394
+ tomato: tomato,
3395
+ tooth: tooth,
3396
+ trout: trout,
3397
+ tuna: tuna,
3398
+ vertebra: vertebra,
3399
+ vertex: vertex,
3400
+ veto: veto,
3401
+ vita: vita,
3402
+ vortex: vortex,
3403
+ watercraft: watercraft,
3404
+ wharf: wharf,
3405
+ wife: wife,
3406
+ wolf: wolf,
3407
+ woman: woman,
3408
+ default: irregularPlurals
3293
3409
  });
3294
3410
 
3295
3411
  var irregularPlurals$2 = ( irregularPlurals$1 && irregularPlurals ) || irregularPlurals$1;
@@ -3312,6 +3428,15 @@ var plur = function (str, plural, count) {
3312
3428
  return count === 1 ? str : plural;
3313
3429
  };
3314
3430
 
3431
+ var plur$1 = /*#__PURE__*/Object.freeze({
3432
+ default: plur,
3433
+ __moduleExports: plur
3434
+ });
3435
+
3436
+ var parseMs$2 = ( parseMs$1 && parseMs ) || parseMs$1;
3437
+
3438
+ var plur$2 = ( plur$1 && plur ) || plur$1;
3439
+
3315
3440
  var prettyMs = (ms, opts) => {
3316
3441
  if (!Number.isFinite(ms)) {
3317
3442
  throw new TypeError('Expected a finite number');
@@ -3321,7 +3446,7 @@ var prettyMs = (ms, opts) => {
3321
3446
 
3322
3447
  if (ms < 1000) {
3323
3448
  const msDecimalDigits = typeof opts.msDecimalDigits === 'number' ? opts.msDecimalDigits : 0;
3324
- return (msDecimalDigits ? ms.toFixed(msDecimalDigits) : Math.ceil(ms)) + (opts.verbose ? ' ' + plur('millisecond', Math.ceil(ms)) : 'ms');
3449
+ return (msDecimalDigits ? ms.toFixed(msDecimalDigits) : Math.ceil(ms)) + (opts.verbose ? ' ' + plur$2('millisecond', Math.ceil(ms)) : 'ms');
3325
3450
  }
3326
3451
 
3327
3452
  const ret = [];
@@ -3331,12 +3456,12 @@ var prettyMs = (ms, opts) => {
3331
3456
  return;
3332
3457
  }
3333
3458
 
3334
- const postfix = opts.verbose ? ' ' + plur(long, val) : short;
3459
+ const postfix = opts.verbose ? ' ' + plur$2(long, val) : short;
3335
3460
 
3336
3461
  ret.push((valStr || val) + postfix);
3337
3462
  };
3338
3463
 
3339
- const parsed = parseMs(ms);
3464
+ const parsed = parseMs$2(ms);
3340
3465
 
3341
3466
  add(Math.trunc(parsed.days / 365), 'year', 'y');
3342
3467
  add(parsed.days % 365, 'day', 'd');
@@ -3393,13 +3518,26 @@ function build(inputOptions, outputOptions, warnings, silent) {
3393
3518
  if (silent === void 0) { silent = false; }
3394
3519
  var useStdout = outputOptions.length === 1 &&
3395
3520
  !outputOptions[0].file &&
3396
- inputOptions.input instanceof Array === false;
3521
+ !outputOptions[0].dir &&
3522
+ inputOptions.input instanceof Array === false &&
3523
+ typeof inputOptions.input !== 'object';
3397
3524
  var start = Date.now();
3398
3525
  var files = useStdout ? ['stdout'] : outputOptions.map(function (t) { return relativeId(t.file || t.dir); });
3399
- if (!silent)
3400
- stderr(chalk.cyan("\n" + chalk.bold(typeof inputOptions.input === 'string'
3401
- ? inputOptions.input
3402
- : inputOptions.input && inputOptions.input.join(', ')) + " \u2192 " + chalk.bold(files.join(', ')) + "..."));
3526
+ if (!silent) {
3527
+ var inputFiles = void 0;
3528
+ if (typeof inputOptions.input === 'string') {
3529
+ inputFiles = inputOptions.input;
3530
+ }
3531
+ else if (inputOptions.input instanceof Array) {
3532
+ inputFiles = inputOptions.input.join(', ');
3533
+ }
3534
+ else if (typeof inputOptions.input === 'object' && inputOptions.input !== null) {
3535
+ inputFiles = Object.keys(inputOptions.input)
3536
+ .map(function (name) { return inputOptions.input[name]; })
3537
+ .join(', ');
3538
+ }
3539
+ stderr(chalk.cyan("\n" + chalk.bold(inputFiles) + " \u2192 " + chalk.bold(files.join(', ')) + "..."));
3540
+ }
3403
3541
  return rollup.rollup(inputOptions)
3404
3542
  .then(function (bundle) {
3405
3543
  if (useStdout) {
@@ -3407,7 +3545,7 @@ function build(inputOptions, outputOptions, warnings, silent) {
3407
3545
  if (output_1.sourcemap && output_1.sourcemap !== 'inline') {
3408
3546
  handleError({
3409
3547
  code: 'MISSING_OUTPUT_OPTION',
3410
- message: 'You must specify an --output (-o) option when creating a file with a sourcemap'
3548
+ message: 'You must specify a --file (-o) option when creating a file with a sourcemap'
3411
3549
  });
3412
3550
  }
3413
3551
  return bundle.generate(output_1).then(function (_a) {
@@ -3489,11 +3627,18 @@ if (process.platform === 'linux') {
3489
3627
  }
3490
3628
  });
3491
3629
 
3630
+ var signals$1 = /*#__PURE__*/Object.freeze({
3631
+ default: signals,
3632
+ __moduleExports: signals
3633
+ });
3634
+
3635
+ var require$$0$1 = ( signals$1 && signals ) || signals$1;
3636
+
3492
3637
  // Note: since nyc uses this module to output coverage, any lines
3493
3638
  // that are in the direct sync flow of nyc's outputCoverage are
3494
3639
  // ignored, since we can never get coverage for them.
3495
3640
 
3496
- var signals$1 = signals;
3641
+ var signals$2 = require$$0$1;
3497
3642
 
3498
3643
  var EE = events;
3499
3644
  /* istanbul ignore if */
@@ -3550,7 +3695,7 @@ function unload () {
3550
3695
  }
3551
3696
  loaded = false;
3552
3697
 
3553
- signals$1.forEach(function (sig) {
3698
+ signals$2.forEach(function (sig) {
3554
3699
  try {
3555
3700
  process.removeListener(sig, sigListeners[sig]);
3556
3701
  } catch (er) {}
@@ -3570,7 +3715,7 @@ function emit (event, code, signal) {
3570
3715
 
3571
3716
  // { <signal>: <listener fn>, ... }
3572
3717
  var sigListeners = {};
3573
- signals$1.forEach(function (sig) {
3718
+ signals$2.forEach(function (sig) {
3574
3719
  sigListeners[sig] = function listener () {
3575
3720
  // If there are no other listeners, an exit is coming!
3576
3721
  // Simplest way: remove us and then re-send the signal.
@@ -3589,7 +3734,7 @@ signals$1.forEach(function (sig) {
3589
3734
  });
3590
3735
 
3591
3736
  var signals_1 = function () {
3592
- return signals$1
3737
+ return signals$2
3593
3738
  };
3594
3739
 
3595
3740
  var load_1 = load;
@@ -3608,7 +3753,7 @@ function load () {
3608
3753
  // handle it instead of us.
3609
3754
  emitter.count += 1;
3610
3755
 
3611
- signals$1 = signals$1.filter(function (sig) {
3756
+ signals$2 = signals$2.filter(function (sig) {
3612
3757
  try {
3613
3758
  process.on(sig, sigListeners[sig]);
3614
3759
  return true
@@ -3660,6 +3805,13 @@ var timeZone = date => {
3660
3805
  return (offset < 0 ? '+' : '-') + hours + minutesOut;
3661
3806
  };
3662
3807
 
3808
+ var timeZone$1 = /*#__PURE__*/Object.freeze({
3809
+ default: timeZone,
3810
+ __moduleExports: timeZone
3811
+ });
3812
+
3813
+ var timeZone$2 = ( timeZone$1 && timeZone ) || timeZone$1;
3814
+
3663
3815
  var dateTime = options => {
3664
3816
  options = Object.assign({
3665
3817
  date: new Date(),
@@ -3678,7 +3830,7 @@ var dateTime = options => {
3678
3830
  let end = '';
3679
3831
 
3680
3832
  if (options.showTimeZone) {
3681
- end = ' UTC' + (options.local ? timeZone(date) : '');
3833
+ end = ' UTC' + (options.local ? timeZone$2(date) : '');
3682
3834
  }
3683
3835
 
3684
3836
  if (options.showMilliseconds && date.getUTCMilliseconds() > 0) {
@@ -3694,6 +3846,9 @@ var dateTime = options => {
3694
3846
  var ansiEscapes = createCommonjsModule(function (module) {
3695
3847
  const x = module.exports;
3696
3848
  const ESC = '\u001B[';
3849
+ const OSC = '\u001B]';
3850
+ const BEL = '\u0007';
3851
+ const SEP = ';';
3697
3852
  const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
3698
3853
 
3699
3854
  x.cursorTo = (x, y) => {
@@ -3768,12 +3923,29 @@ x.scrollUp = ESC + 'S';
3768
3923
  x.scrollDown = ESC + 'T';
3769
3924
 
3770
3925
  x.clearScreen = '\u001Bc';
3771
- x.beep = '\u0007';
3926
+ x.beep = BEL;
3927
+
3928
+ x.link = (text, url) => {
3929
+ return [
3930
+ OSC,
3931
+ '8',
3932
+ SEP,
3933
+ SEP,
3934
+ url,
3935
+ BEL,
3936
+ text,
3937
+ OSC,
3938
+ '8',
3939
+ SEP,
3940
+ SEP,
3941
+ BEL
3942
+ ].join('');
3943
+ };
3772
3944
 
3773
3945
  x.image = (buf, opts) => {
3774
3946
  opts = opts || {};
3775
3947
 
3776
- let ret = '\u001B]1337;File=inline=1';
3948
+ let ret = OSC + '1337;File=inline=1';
3777
3949
 
3778
3950
  if (opts.width) {
3779
3951
  ret += `;width=${opts.width}`;
@@ -3787,12 +3959,12 @@ x.image = (buf, opts) => {
3787
3959
  ret += ';preserveAspectRatio=0';
3788
3960
  }
3789
3961
 
3790
- return ret + ':' + buf.toString('base64') + '\u0007';
3962
+ return ret + ':' + buf.toString('base64') + BEL;
3791
3963
  };
3792
3964
 
3793
3965
  x.iTerm = {};
3794
3966
 
3795
- x.iTerm.setCwd = cwd => '\u001B]50;CurrentDir=' + (cwd || process.cwd()) + '\u0007';
3967
+ x.iTerm.setCwd = cwd => OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL;
3796
3968
  });
3797
3969
 
3798
3970
  var SHOW_ALTERNATE_SCREEN = '\u001B[?1049h';
@@ -3891,6 +4063,9 @@ function watch(configFile, configs, command, silent) {
3891
4063
  warnings.flush();
3892
4064
  if (!silent)
3893
4065
  stderr(chalk.green("created " + chalk.bold(event.output.map(relativeId).join(', ')) + " in " + chalk.bold(prettyMs(event.duration))));
4066
+ if (event.result && event.result.getTimings) {
4067
+ printTimings(event.result.getTimings());
4068
+ }
3894
4069
  break;
3895
4070
  case 'END':
3896
4071
  if (!silent && isTTY) {
@@ -3971,8 +4146,29 @@ function runRollup(command) {
3971
4146
  });
3972
4147
  }
3973
4148
  }
3974
- if (command.output && command.output.dir) {
3975
- command.input = command._;
4149
+ if (command.dir) {
4150
+ if (command._.length && !command._.some(function (input) { return input.indexOf('=') !== -1; })) {
4151
+ command.input = command._;
4152
+ }
4153
+ else if (command._.length ||
4154
+ Array.isArray(command.input) ||
4155
+ typeof command.input === 'string') {
4156
+ var input = void 0;
4157
+ if (command._.length)
4158
+ input = command._;
4159
+ else
4160
+ input = typeof command.input === 'string' ? [command.input] : command.input;
4161
+ command.input = {};
4162
+ input.forEach(function (input) {
4163
+ var equalsIndex = input.indexOf('=');
4164
+ var value = input.substr(equalsIndex + 1);
4165
+ var key = input.substr(0, equalsIndex);
4166
+ if (!key) {
4167
+ key = nameWithoutExtension(path.basename(input));
4168
+ }
4169
+ command.input[key] = value;
4170
+ });
4171
+ }
3976
4172
  command._ = [];
3977
4173
  }
3978
4174
  else if (command._.length === 1) {
@@ -4059,25 +4255,7 @@ function execute(configFile, configs, command) {
4059
4255
  }
4060
4256
 
4061
4257
  var command = minimist(process.argv.slice(2), {
4062
- alias: {
4063
- // Aliases
4064
- strict: 'useStrict',
4065
- dir: 'output.dir',
4066
- // Short options
4067
- c: 'config',
4068
- d: 'indent',
4069
- e: 'external',
4070
- f: 'output.format',
4071
- g: 'globals',
4072
- h: 'help',
4073
- i: 'input',
4074
- l: 'legacy',
4075
- m: 'sourcemap',
4076
- n: 'name',
4077
- o: 'output.file',
4078
- v: 'version',
4079
- w: 'watch'
4080
- }
4258
+ alias: commandAliases
4081
4259
  });
4082
4260
  if (command.help || (process.argv.length <= 2 && process.stdin.isTTY)) {
4083
4261
  console.log("\n" + help.replace('__VERSION__', version) + "\n"); // eslint-disable-line no-console