Sha256: 250a6bc2d0c5d4e7a6a962968b457aa402f0c699cadf301045a267052c9f222b

Contents?: true

Size: 1.55 KB

Versions: 23

Compression:

Stored size: 1.55 KB

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = normalizeOptions;
function _path() {
  const data = require("path");
  _path = function () {
    return data;
  };
  return data;
}
function normalizeOptions(config) {
  const {
    filename,
    cwd,
    filenameRelative = typeof filename === "string" ? _path().relative(cwd, filename) : "unknown",
    sourceType = "module",
    inputSourceMap,
    sourceMaps = !!inputSourceMap,
    sourceRoot = config.options.moduleRoot,
    sourceFileName = _path().basename(filenameRelative),
    comments = true,
    compact = "auto"
  } = config.options;
  const opts = config.options;
  const options = Object.assign({}, opts, {
    parserOpts: Object.assign({
      sourceType: _path().extname(filenameRelative) === ".mjs" ? "module" : sourceType,
      sourceFileName: filename,
      plugins: []
    }, opts.parserOpts),
    generatorOpts: Object.assign({
      filename,
      auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
      auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
      retainLines: opts.retainLines,
      comments,
      shouldPrintComment: opts.shouldPrintComment,
      compact,
      minified: opts.minified,
      sourceMaps,
      sourceRoot,
      sourceFileName
    }, opts.generatorOpts)
  });
  for (const plugins of config.passes) {
    for (const plugin of plugins) {
      if (plugin.manipulateOptions) {
        plugin.manipulateOptions(options, options.parserOpts);
      }
    }
  }
  return options;
}
0 && 0;

//# sourceMappingURL=normalize-opts.js.map

Version data entries

23 entries across 16 versions & 3 rubygems

Version Path
trusty-cms-6.3.1 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.51 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.51 node_modules/jscodeshift/node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.50 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.50 node_modules/jscodeshift/node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.49 node_modules/jscodeshift/node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.49 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.48 node_modules/jscodeshift/node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.48 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.47 node_modules/jscodeshift/node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.47 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.46 node_modules/jscodeshift/node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.46 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.45 node_modules/jscodeshift/node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.45 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.44 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.43 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.42 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.41 node_modules/@babel/core/lib/transformation/normalize-opts.js
immosquare-cleaner-0.1.40 node_modules/@babel/core/lib/transformation/normalize-opts.js