UNPKG

ts-add-js-extension

Version:

Add .js extension to each relative ESM import and export statement in JavaScript file

30 lines 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseConfig = exports.normaliseConfig = void 0; /** * @deprecated since version 1.4.0 * Will be deleted in version 2.0 * There is no need to parse config with this function * As configurations can be passed directly * Using this function will halt the program * And requires you to write configs directly * */ var parseConfig = function (_) { throw new Error([ "Function parseConfig should not be used, this function exists because of \"yargs\"", "Now yargs is removed, cli arguments parser is hand-written", ].join('\n')); }; exports.parseConfig = parseConfig; var normaliseConfig = function (config) { var _a, _b, _c; return { dir: config.dir, // eslint-disable-next-line @typescript-eslint/no-deprecated showProgress: (_b = (_a = config.showProgress) !== null && _a !== void 0 ? _a : config.showChanges) !== null && _b !== void 0 ? _b : true, // eslint-disable-next-line @typescript-eslint/no-deprecated include: (_c = config.include) !== null && _c !== void 0 ? _c : [], }; }; exports.normaliseConfig = normaliseConfig; //# sourceMappingURL=config.js.map