mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Update Babel to latest version
This commit is contained in:
parent
8486135090
commit
d40fa7f28e
|
|
@ -1,3 +1,19 @@
|
|||
This is just a fork of babel-cli to support incremental builds.
|
||||
# @babel/cli
|
||||
|
||||
See: https://github.com/babel/babel/pull/8877
|
||||
> Babel command line.
|
||||
|
||||
See our website [@babel/cli](https://babeljs.io/docs/en/babel-cli) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20cli%22+is%3Aopen) associated with this package.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/cli
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/cli --dev
|
||||
```
|
||||
|
|
|
|||
|
|
@ -5,73 +5,34 @@ Object.defineProperty(exports, "__esModule", {
|
|||
});
|
||||
exports.default = _default;
|
||||
|
||||
function _defaults() {
|
||||
const data = _interopRequireDefault(require("lodash/defaults"));
|
||||
|
||||
_defaults = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _outputFileSync() {
|
||||
const data = _interopRequireDefault(require("output-file-sync"));
|
||||
|
||||
_outputFileSync = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _mkdirp() {
|
||||
const data = require("mkdirp");
|
||||
|
||||
_mkdirp = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _slash() {
|
||||
const data = _interopRequireDefault(require("slash"));
|
||||
|
||||
_slash = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require("path"));
|
||||
|
||||
_path = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _fs() {
|
||||
const data = _interopRequireDefault(require("fs"));
|
||||
|
||||
_fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var util = _interopRequireWildcard(require("./util"));
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
const NOT_COMPILABLE = null;
|
||||
const debounce = require("lodash/debounce");
|
||||
|
||||
const slash = require("slash");
|
||||
|
||||
const path = require("path");
|
||||
|
||||
const fs = require("fs");
|
||||
|
||||
const FILE_TYPE = Object.freeze({
|
||||
NON_COMPILABLE: "NON_COMPILABLE",
|
||||
COMPILED: "COMPILED",
|
||||
IGNORED: "IGNORED",
|
||||
ERR_COMPILATION: "ERR_COMPILATION",
|
||||
NO_REBUILD_NEEDED: "NO_REBUILD_NEEDED"
|
||||
});
|
||||
|
||||
function outputFileSync(filePath, data) {
|
||||
fs.mkdirSync(path.dirname(filePath), {
|
||||
recursive: true
|
||||
});
|
||||
fs.writeFileSync(filePath, data);
|
||||
}
|
||||
|
||||
async function _default({
|
||||
cliOptions,
|
||||
|
|
@ -80,50 +41,41 @@ async function _default({
|
|||
const filenames = cliOptions.filenames;
|
||||
|
||||
async function write(src, base) {
|
||||
let relative = _path().default.relative(base, src);
|
||||
let relative = path.relative(base, src);
|
||||
|
||||
if (!util.isCompilableExtension(relative, cliOptions.extensions)) {
|
||||
return NOT_COMPILABLE;
|
||||
return FILE_TYPE.NON_COMPILABLE;
|
||||
}
|
||||
|
||||
relative = util.adjustRelative(relative, cliOptions.keepFileExtension);
|
||||
relative = util.withExtension(relative, cliOptions.keepFileExtension ? path.extname(relative) : cliOptions.outFileExtension);
|
||||
const dest = getDest(relative, base);
|
||||
|
||||
if (cliOptions.incremental) {
|
||||
try {
|
||||
const srcStat = _fs().default.statSync(src);
|
||||
|
||||
const destStat = _fs().default.statSync(dest);
|
||||
|
||||
if (srcStat.ctimeMs < destStat.ctimeMs) return false;
|
||||
} catch (e) {}
|
||||
}
|
||||
if (noRebuildNeeded(src, dest)) return FILE_TYPE.NO_REBUILD_NEEDED;
|
||||
|
||||
try {
|
||||
const res = await util.compile(src, (0, _defaults().default)({
|
||||
sourceFileName: (0, _slash().default)(_path().default.relative(dest + "/..", src))
|
||||
}, babelOptions));
|
||||
if (!res) return NOT_COMPILABLE;
|
||||
const res = await util.compile(src, Object.assign({}, babelOptions, {
|
||||
sourceFileName: slash(path.relative(dest + "/..", src))
|
||||
}));
|
||||
if (!res) return FILE_TYPE.IGNORED;
|
||||
|
||||
if (res.map && babelOptions.sourceMaps && babelOptions.sourceMaps !== "inline") {
|
||||
const mapLoc = dest + ".map";
|
||||
res.code = util.addSourceMappingUrl(res.code, mapLoc);
|
||||
res.map.file = _path().default.basename(relative);
|
||||
(0, _outputFileSync().default)(mapLoc, JSON.stringify(res.map));
|
||||
res.map.file = path.basename(relative);
|
||||
outputFileSync(mapLoc, JSON.stringify(res.map));
|
||||
}
|
||||
|
||||
(0, _outputFileSync().default)(dest, res.code);
|
||||
outputFileSync(dest, res.code);
|
||||
util.chmod(src, dest);
|
||||
|
||||
if (cliOptions.verbose) {
|
||||
console.log(src + " -> " + dest);
|
||||
}
|
||||
|
||||
return true;
|
||||
return FILE_TYPE.COMPILED;
|
||||
} catch (err) {
|
||||
if (cliOptions.watch) {
|
||||
console.error(err);
|
||||
return false;
|
||||
return FILE_TYPE.ERR_COMPILATION;
|
||||
}
|
||||
|
||||
throw err;
|
||||
|
|
@ -132,44 +84,42 @@ async function _default({
|
|||
|
||||
function getDest(filename, base) {
|
||||
if (cliOptions.relative) {
|
||||
return _path().default.join(base, cliOptions.outDir, filename);
|
||||
return path.join(base, cliOptions.outDir, filename);
|
||||
}
|
||||
|
||||
return _path().default.join(cliOptions.outDir, filename);
|
||||
return path.join(cliOptions.outDir, filename);
|
||||
}
|
||||
|
||||
function noRebuildNeeded(src, dest) {
|
||||
if (!cliOptions.incremental) return false;
|
||||
|
||||
try {
|
||||
const srcStat = fs.statSync(src);
|
||||
const destStat = fs.statSync(dest);
|
||||
if (srcStat.ctimeMs < destStat.ctimeMs) return true;
|
||||
} catch (e) {}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
async function handleFile(src, base) {
|
||||
const written = await write(src, base);
|
||||
|
||||
if (written === NOT_COMPILABLE) {
|
||||
if (!cliOptions.copyFiles) return false;
|
||||
|
||||
const filename = _path().default.relative(base, src);
|
||||
|
||||
if (cliOptions.copyFiles && written === FILE_TYPE.NON_COMPILABLE || cliOptions.copyIgnored && written === FILE_TYPE.IGNORED) {
|
||||
const filename = path.relative(base, src);
|
||||
const dest = getDest(filename, base);
|
||||
|
||||
if (cliOptions.incremental) {
|
||||
try {
|
||||
const srcStat = _fs().default.statSync(src);
|
||||
|
||||
const destStat = _fs().default.statSync(dest);
|
||||
|
||||
if (srcStat.ctimeMs < destStat.ctimeMs) return false;
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
(0, _outputFileSync().default)(dest, _fs().default.readFileSync(src));
|
||||
if (noRebuildNeeded(src, dest)) return false;
|
||||
outputFileSync(dest, fs.readFileSync(src));
|
||||
util.chmod(src, dest);
|
||||
return false;
|
||||
}
|
||||
|
||||
return written;
|
||||
return written === FILE_TYPE.COMPILED;
|
||||
}
|
||||
|
||||
async function handle(filenameOrDir) {
|
||||
if (!_fs().default.existsSync(filenameOrDir)) return 0;
|
||||
|
||||
const stat = _fs().default.statSync(filenameOrDir);
|
||||
if (!fs.existsSync(filenameOrDir)) return 0;
|
||||
const stat = fs.statSync(filenameOrDir);
|
||||
|
||||
if (stat.isDirectory()) {
|
||||
const dirname = filenameOrDir;
|
||||
|
|
@ -177,8 +127,7 @@ async function _default({
|
|||
const files = util.readdir(dirname, cliOptions.includeDotfiles);
|
||||
|
||||
for (const filename of files) {
|
||||
const src = _path().default.join(dirname, filename);
|
||||
|
||||
const src = path.join(dirname, filename);
|
||||
const written = await handleFile(src, dirname);
|
||||
if (written) count += 1;
|
||||
}
|
||||
|
|
@ -186,24 +135,44 @@ async function _default({
|
|||
return count;
|
||||
} else {
|
||||
const filename = filenameOrDir;
|
||||
const written = await handleFile(filename, _path().default.dirname(filename));
|
||||
const written = await handleFile(filename, path.dirname(filename));
|
||||
return written ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
let compiledFiles = 0;
|
||||
let startTime = null;
|
||||
const logSuccess = debounce(function () {
|
||||
if (startTime === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const diff = process.hrtime(startTime);
|
||||
console.log(`Successfully compiled ${compiledFiles} ${compiledFiles !== 1 ? "files" : "file"} with Babel (${diff[0] * 1e3 + Math.round(diff[1] / 1e6)}ms).`);
|
||||
compiledFiles = 0;
|
||||
startTime = null;
|
||||
}, 100, {
|
||||
trailing: true
|
||||
});
|
||||
|
||||
if (!cliOptions.skipInitialBuild) {
|
||||
if (cliOptions.deleteDirOnStart) {
|
||||
util.deleteDir(cliOptions.outDir);
|
||||
}
|
||||
|
||||
(0, _mkdirp().sync)(cliOptions.outDir);
|
||||
let compiledFiles = 0;
|
||||
fs.mkdirSync(cliOptions.outDir, {
|
||||
recursive: true
|
||||
});
|
||||
startTime = process.hrtime();
|
||||
|
||||
for (const filename of cliOptions.filenames) {
|
||||
compiledFiles += await handle(filename);
|
||||
}
|
||||
|
||||
console.log(`Successfully compiled ${compiledFiles} ${compiledFiles !== 1 ? "files" : "file"} with Babel.`);
|
||||
if (!cliOptions.quiet) {
|
||||
logSuccess();
|
||||
logSuccess.flush();
|
||||
}
|
||||
}
|
||||
|
||||
if (cliOptions.watch) {
|
||||
|
|
@ -217,11 +186,21 @@ async function _default({
|
|||
pollInterval: 10
|
||||
}
|
||||
});
|
||||
let processing = 0;
|
||||
["add", "change"].forEach(function (type) {
|
||||
watcher.on(type, function (filename) {
|
||||
handleFile(filename, filename === filenameOrDir ? _path().default.dirname(filenameOrDir) : filenameOrDir).catch(err => {
|
||||
watcher.on(type, async function (filename) {
|
||||
processing++;
|
||||
if (startTime === null) startTime = process.hrtime();
|
||||
|
||||
try {
|
||||
await handleFile(filename, filename === filenameOrDir ? path.dirname(filenameOrDir) : filenameOrDir);
|
||||
compiledFiles++;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
processing--;
|
||||
if (processing === 0 && !cliOptions.quiet) logSuccess();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
200
build-tools/babel-cli/lib/babel/file.js
Normal file
200
build-tools/babel-cli/lib/babel/file.js
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = _default;
|
||||
|
||||
var util = _interopRequireWildcard(require("./util"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
const convertSourceMap = require("convert-source-map");
|
||||
|
||||
const sourceMap = require("source-map");
|
||||
|
||||
const slash = require("slash");
|
||||
|
||||
const path = require("path");
|
||||
|
||||
const fs = require("fs");
|
||||
|
||||
async function _default({
|
||||
cliOptions,
|
||||
babelOptions
|
||||
}) {
|
||||
function buildResult(fileResults) {
|
||||
const map = new sourceMap.SourceMapGenerator({
|
||||
file: cliOptions.sourceMapTarget || path.basename(cliOptions.outFile || "") || "stdout",
|
||||
sourceRoot: babelOptions.sourceRoot
|
||||
});
|
||||
let code = "";
|
||||
let offset = 0;
|
||||
|
||||
for (const result of fileResults) {
|
||||
if (!result) continue;
|
||||
code += result.code + "\n";
|
||||
|
||||
if (result.map) {
|
||||
const consumer = new sourceMap.SourceMapConsumer(result.map);
|
||||
const sources = new Set();
|
||||
consumer.eachMapping(function (mapping) {
|
||||
if (mapping.source != null) sources.add(mapping.source);
|
||||
map.addMapping({
|
||||
generated: {
|
||||
line: mapping.generatedLine + offset,
|
||||
column: mapping.generatedColumn
|
||||
},
|
||||
source: mapping.source,
|
||||
original: mapping.source == null ? null : {
|
||||
line: mapping.originalLine,
|
||||
column: mapping.originalColumn
|
||||
}
|
||||
});
|
||||
});
|
||||
sources.forEach(source => {
|
||||
const content = consumer.sourceContentFor(source, true);
|
||||
|
||||
if (content !== null) {
|
||||
map.setSourceContent(source, content);
|
||||
}
|
||||
});
|
||||
offset = code.split("\n").length - 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (babelOptions.sourceMaps === "inline" || !cliOptions.outFile && babelOptions.sourceMaps) {
|
||||
code += "\n" + convertSourceMap.fromObject(map).toComment();
|
||||
}
|
||||
|
||||
return {
|
||||
map: map,
|
||||
code: code
|
||||
};
|
||||
}
|
||||
|
||||
function output(fileResults) {
|
||||
const result = buildResult(fileResults);
|
||||
|
||||
if (cliOptions.outFile) {
|
||||
fs.mkdirSync(path.dirname(cliOptions.outFile), {
|
||||
recursive: true
|
||||
});
|
||||
|
||||
if (babelOptions.sourceMaps && babelOptions.sourceMaps !== "inline") {
|
||||
const mapLoc = cliOptions.outFile + ".map";
|
||||
result.code = util.addSourceMappingUrl(result.code, mapLoc);
|
||||
fs.writeFileSync(mapLoc, JSON.stringify(result.map));
|
||||
}
|
||||
|
||||
fs.writeFileSync(cliOptions.outFile, result.code);
|
||||
} else {
|
||||
process.stdout.write(result.code + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
function readStdin() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let code = "";
|
||||
process.stdin.setEncoding("utf8");
|
||||
process.stdin.on("readable", function () {
|
||||
const chunk = process.stdin.read();
|
||||
if (chunk !== null) code += chunk;
|
||||
});
|
||||
process.stdin.on("end", function () {
|
||||
resolve(code);
|
||||
});
|
||||
process.stdin.on("error", reject);
|
||||
});
|
||||
}
|
||||
|
||||
async function stdin() {
|
||||
const code = await readStdin();
|
||||
const res = await util.transform(cliOptions.filename, code, Object.assign({}, babelOptions, {
|
||||
sourceFileName: "stdin"
|
||||
}));
|
||||
output([res]);
|
||||
}
|
||||
|
||||
async function walk(filenames) {
|
||||
const _filenames = [];
|
||||
filenames.forEach(function (filename) {
|
||||
if (!fs.existsSync(filename)) return;
|
||||
const stat = fs.statSync(filename);
|
||||
|
||||
if (stat.isDirectory()) {
|
||||
const dirname = filename;
|
||||
util.readdirForCompilable(filename, cliOptions.includeDotfiles, cliOptions.extensions).forEach(function (filename) {
|
||||
_filenames.push(path.join(dirname, filename));
|
||||
});
|
||||
} else {
|
||||
_filenames.push(filename);
|
||||
}
|
||||
});
|
||||
const results = await Promise.all(_filenames.map(async function (filename) {
|
||||
let sourceFilename = filename;
|
||||
|
||||
if (cliOptions.outFile) {
|
||||
sourceFilename = path.relative(path.dirname(cliOptions.outFile), sourceFilename);
|
||||
}
|
||||
|
||||
sourceFilename = slash(sourceFilename);
|
||||
|
||||
try {
|
||||
return await util.compile(filename, Object.assign({}, babelOptions, {
|
||||
sourceFileName: sourceFilename,
|
||||
sourceMaps: babelOptions.sourceMaps === "inline" ? true : babelOptions.sourceMaps
|
||||
}));
|
||||
} catch (err) {
|
||||
if (!cliOptions.watch) {
|
||||
throw err;
|
||||
}
|
||||
|
||||
console.error(err);
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
output(results);
|
||||
}
|
||||
|
||||
async function files(filenames) {
|
||||
if (!cliOptions.skipInitialBuild) {
|
||||
await walk(filenames);
|
||||
}
|
||||
|
||||
if (cliOptions.watch) {
|
||||
const chokidar = util.requireChokidar();
|
||||
chokidar.watch(filenames, {
|
||||
disableGlobbing: true,
|
||||
persistent: true,
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish: {
|
||||
stabilityThreshold: 50,
|
||||
pollInterval: 10
|
||||
}
|
||||
}).on("all", function (type, filename) {
|
||||
if (!util.isCompilableExtension(filename, cliOptions.extensions) && !filenames.includes(filename)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (type === "add" || type === "change") {
|
||||
if (cliOptions.verbose) {
|
||||
console.log(type + " " + filename);
|
||||
}
|
||||
|
||||
walk(filenames).catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (cliOptions.filenames.length) {
|
||||
await files(cliOptions.filenames);
|
||||
} else {
|
||||
await stdin();
|
||||
}
|
||||
}
|
||||
|
|
@ -5,14 +5,18 @@ var _options = _interopRequireDefault(require("./options"));
|
|||
|
||||
var _dir = _interopRequireDefault(require("./dir"));
|
||||
|
||||
var _file = _interopRequireDefault(require("./file"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const opts = (0, _options.default)(process.argv);
|
||||
|
||||
if (!opts.cliOptions.outDir) throw new Error("This fork of babel-cli is cut down to only what Pokemon-Showdown-Client uses, and only supports `--out-dir` mode");
|
||||
|
||||
const fn = _dir.default;
|
||||
fn(opts).catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
if (opts) {
|
||||
const fn = opts.cliOptions.outDir ? _dir.default : _file.default;
|
||||
fn(opts).catch(err => {
|
||||
console.error(err);
|
||||
process.exitCode = 1;
|
||||
});
|
||||
} else {
|
||||
process.exitCode = 2;
|
||||
}
|
||||
|
|
@ -5,26 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|||
});
|
||||
exports.default = parseArgv;
|
||||
|
||||
function _fs() {
|
||||
const data = _interopRequireDefault(require("fs"));
|
||||
|
||||
_fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _commander() {
|
||||
const data = _interopRequireDefault(require("commander"));
|
||||
|
||||
_commander = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _core() {
|
||||
const data = require("@babel/core");
|
||||
|
||||
|
|
@ -35,139 +15,88 @@ function _core() {
|
|||
return data;
|
||||
}
|
||||
|
||||
function _uniq() {
|
||||
const data = _interopRequireDefault(require("lodash/uniq"));
|
||||
const fs = require("fs");
|
||||
|
||||
_uniq = function () {
|
||||
return data;
|
||||
};
|
||||
const commander = require("commander");
|
||||
|
||||
return data;
|
||||
const glob = require("glob");
|
||||
|
||||
commander.option("-f, --filename [filename]", "The filename to use when reading from stdin. This will be used in source-maps, errors etc.");
|
||||
commander.option("--presets [list]", "A comma-separated list of preset names.", collect);
|
||||
commander.option("--plugins [list]", "A comma-separated list of plugin names.", collect);
|
||||
commander.option("--config-file [path]", "Path to a .babelrc file to use.");
|
||||
commander.option("--env-name [name]", "The name of the 'env' to use when loading configs and plugins. " + "Defaults to the value of BABEL_ENV, or else NODE_ENV, or else 'development'.");
|
||||
commander.option("--root-mode [mode]", "The project-root resolution mode. " + "One of 'root' (the default), 'upward', or 'upward-optional'.");
|
||||
commander.option("--source-type [script|module]", "");
|
||||
commander.option("--no-babelrc", "Whether or not to look up .babelrc and .babelignore files.");
|
||||
commander.option("--ignore [list]", "List of glob paths to **not** compile.", collect);
|
||||
commander.option("--only [list]", "List of glob paths to **only** compile.", collect);
|
||||
commander.option("--no-highlight-code", "Enable or disable ANSI syntax highlighting of code frames. (on by default)");
|
||||
commander.option("--no-comments", "Write comments to generated output. (true by default)");
|
||||
commander.option("--retain-lines", "Retain line numbers. This will result in really ugly code.");
|
||||
commander.option("--compact [true|false|auto]", "Do not include superfluous whitespace characters and line terminators.", booleanify);
|
||||
commander.option("--minified", "Save as many bytes when printing. (false by default)");
|
||||
commander.option("--auxiliary-comment-before [string]", "Print a comment before any injected non-user code.");
|
||||
commander.option("--auxiliary-comment-after [string]", "Print a comment after any injected non-user code.");
|
||||
commander.option("-s, --source-maps [true|false|inline|both]", "", booleanify);
|
||||
commander.option("--source-map-target [string]", "Set `file` on returned source map.");
|
||||
commander.option("--source-file-name [string]", "Set `sources[0]` on returned source map.");
|
||||
commander.option("--source-root [filename]", "The root from which all sources are relative.");
|
||||
|
||||
if (!process.env.BABEL_8_BREAKING) {
|
||||
commander.option("--module-root [filename]", "Optional prefix for the AMD module formatter that will be prepended to the filename on module definitions.");
|
||||
commander.option("-M, --module-ids", "Insert an explicit id for modules.");
|
||||
commander.option("--module-id [string]", "Specify a custom name for module ids.");
|
||||
}
|
||||
|
||||
function _glob() {
|
||||
const data = _interopRequireDefault(require("glob"));
|
||||
|
||||
_glob = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var _package = _interopRequireDefault(require("../../package.json"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
_commander().default.option("-f, --filename [filename]", "filename to use when reading from stdin - this will be used in source-maps, errors etc");
|
||||
|
||||
_commander().default.option("--presets [list]", "comma-separated list of preset names", collect);
|
||||
|
||||
_commander().default.option("--plugins [list]", "comma-separated list of plugin names", collect);
|
||||
|
||||
_commander().default.option("--config-file [path]", "Path a to .babelrc file to use");
|
||||
|
||||
_commander().default.option("--env-name [name]", "The name of the 'env' to use when loading configs and plugins. " + "Defaults to the value of BABEL_ENV, or else NODE_ENV, or else 'development'.");
|
||||
|
||||
_commander().default.option("--root-mode [mode]", "The project-root resolution mode. " + "One of 'root' (the default), 'upward', or 'upward-optional'.");
|
||||
|
||||
_commander().default.option("--source-type [script|module]", "");
|
||||
|
||||
_commander().default.option("--no-babelrc", "Whether or not to look up .babelrc and .babelignore files");
|
||||
|
||||
_commander().default.option("--ignore [list]", "list of glob paths to **not** compile", collect);
|
||||
|
||||
_commander().default.option("--only [list]", "list of glob paths to **only** compile", collect);
|
||||
|
||||
_commander().default.option("--no-highlight-code", "enable/disable ANSI syntax highlighting of code frames (on by default)");
|
||||
|
||||
_commander().default.option("--no-comments", "write comments to generated output (true by default)");
|
||||
|
||||
_commander().default.option("--retain-lines", "retain line numbers - will result in really ugly code");
|
||||
|
||||
_commander().default.option("--compact [true|false|auto]", "do not include superfluous whitespace characters and line terminators", booleanify);
|
||||
|
||||
_commander().default.option("--minified", "save as much bytes when printing [true|false]");
|
||||
|
||||
_commander().default.option("--auxiliary-comment-before [string]", "print a comment before any injected non-user code");
|
||||
|
||||
_commander().default.option("--auxiliary-comment-after [string]", "print a comment after any injected non-user code");
|
||||
|
||||
_commander().default.option("-s, --source-maps [true|false|inline|both]", "", booleanify);
|
||||
|
||||
_commander().default.option("--source-map-target [string]", "set `file` on returned source map");
|
||||
|
||||
_commander().default.option("--source-file-name [string]", "set `sources[0]` on returned source map");
|
||||
|
||||
_commander().default.option("--source-root [filename]", "the root from which all sources are relative");
|
||||
|
||||
_commander().default.option("--module-root [filename]", "optional prefix for the AMD module formatter that will be prepend to the filename on module definitions");
|
||||
|
||||
_commander().default.option("-M, --module-ids", "insert an explicit id for modules");
|
||||
|
||||
_commander().default.option("--module-id [string]", "specify a custom name for module ids");
|
||||
|
||||
_commander().default.option("-x, --extensions [extensions]", "List of extensions to compile when a directory has been input [.es6,.js,.es,.jsx,.mjs]", collect);
|
||||
|
||||
_commander().default.option("--keep-file-extension", "Preserve the file extensions of the input files");
|
||||
|
||||
_commander().default.option("-w, --watch", "Recompile files on changes");
|
||||
|
||||
_commander().default.option("--skip-initial-build", "Do not compile files before watching");
|
||||
|
||||
_commander().default.option("--incremental", "Only compile files with modification time before corresponding output file");
|
||||
|
||||
_commander().default.option("-o, --out-file [out]", "Compile all input files into a single file");
|
||||
|
||||
_commander().default.option("-d, --out-dir [out]", "Compile an input directory of modules into an output directory");
|
||||
|
||||
_commander().default.option("--relative", "Compile into an output directory relative to input directory or file. Requires --out-dir [out]");
|
||||
|
||||
_commander().default.option("-D, --copy-files", "When compiling a directory copy over non-compilable files");
|
||||
|
||||
_commander().default.option("--include-dotfiles", "Include dotfiles when compiling and copying non-compilable files");
|
||||
|
||||
_commander().default.option("--verbose", "Log everything");
|
||||
|
||||
_commander().default.option("--delete-dir-on-start", "Delete the out directory before compilation");
|
||||
|
||||
_commander().default.version(_package.default.version + " (@babel/core " + _core().version + ")");
|
||||
|
||||
_commander().default.usage("[options] <files ...>");
|
||||
commander.option("-x, --extensions [extensions]", "List of extensions to compile when a directory has been the input. [.es6,.js,.es,.jsx,.mjs]", collect);
|
||||
commander.option("--keep-file-extension", "Preserve the file extensions of the input files.");
|
||||
commander.option("-w, --watch", "Recompile files on changes.");
|
||||
commander.option("--skip-initial-build", "Do not compile files before watching.");
|
||||
commander.option("--incremental", "Only compile files with modification time before corresponding output file");
|
||||
commander.option("-o, --out-file [out]", "Compile all input files into a single file.");
|
||||
commander.option("-d, --out-dir [out]", "Compile an input directory of modules into an output directory.");
|
||||
commander.option("--relative", "Compile into an output directory relative to input directory or file. Requires --out-dir [out]");
|
||||
commander.option("-D, --copy-files", "When compiling a directory copy over non-compilable files.");
|
||||
commander.option("--include-dotfiles", "Include dotfiles when compiling and copying non-compilable files.");
|
||||
commander.option("--no-copy-ignored", "Exclude ignored files when copying non-compilable files.");
|
||||
commander.option("--verbose", "Log everything. This option conflicts with --quiet");
|
||||
commander.option("--quiet", "Don't log anything. This option conflicts with --verbose");
|
||||
commander.option("--delete-dir-on-start", "Delete the out directory before compilation.");
|
||||
commander.option("--out-file-extension [string]", "Use a specific extension for the output files");
|
||||
commander.version("7.13.14" + " (@babel/core " + _core().version + ")");
|
||||
commander.usage("[options] <files ...>");
|
||||
commander.action(() => {});
|
||||
|
||||
function parseArgv(args) {
|
||||
_commander().default.parse(args);
|
||||
|
||||
commander.parse(args);
|
||||
const errors = [];
|
||||
|
||||
let filenames = _commander().default.args.reduce(function (globbed, input) {
|
||||
let files = _glob().default.sync(input);
|
||||
|
||||
let filenames = commander.args.reduce(function (globbed, input) {
|
||||
let files = glob.sync(input);
|
||||
if (!files.length) files = [input];
|
||||
return globbed.concat(files);
|
||||
}, []);
|
||||
|
||||
filenames = (0, _uniq().default)(filenames);
|
||||
filenames = Array.from(new Set(filenames));
|
||||
filenames.forEach(function (filename) {
|
||||
if (!_fs().default.existsSync(filename)) {
|
||||
if (!fs.existsSync(filename)) {
|
||||
errors.push(filename + " does not exist");
|
||||
}
|
||||
});
|
||||
|
||||
if (_commander().default.outDir && !filenames.length) {
|
||||
if (commander.outDir && !filenames.length) {
|
||||
errors.push("--out-dir requires filenames");
|
||||
}
|
||||
|
||||
if (_commander().default.outFile && _commander().default.outDir) {
|
||||
if (commander.outFile && commander.outDir) {
|
||||
errors.push("--out-file and --out-dir cannot be used together");
|
||||
}
|
||||
|
||||
if (_commander().default.relative && !_commander().default.outDir) {
|
||||
if (commander.relative && !commander.outDir) {
|
||||
errors.push("--relative requires --out-dir usage");
|
||||
}
|
||||
|
||||
if (_commander().default.watch) {
|
||||
if (!_commander().default.outFile && !_commander().default.outDir) {
|
||||
if (commander.watch) {
|
||||
if (!commander.outFile && !commander.outDir) {
|
||||
errors.push("--watch requires --out-file or --out-dir");
|
||||
}
|
||||
|
||||
|
|
@ -176,32 +105,39 @@ function parseArgv(args) {
|
|||
}
|
||||
}
|
||||
|
||||
if (_commander().default.skipInitialBuild && !_commander().default.watch) {
|
||||
if (commander.skipInitialBuild && !commander.watch) {
|
||||
errors.push("--skip-initial-build requires --watch");
|
||||
}
|
||||
|
||||
if (_commander().default.incremental && !_commander().default.outDir) {
|
||||
if (commander.incremental && !commander.outDir) {
|
||||
errors.push("--incremental requires --out-dir");
|
||||
}
|
||||
|
||||
if (_commander().default.deleteDirOnStart && !_commander().default.outDir) {
|
||||
if (commander.deleteDirOnStart && !commander.outDir) {
|
||||
errors.push("--delete-dir-on-start requires --out-dir");
|
||||
}
|
||||
|
||||
if (!_commander().default.outDir && filenames.length === 0 && typeof _commander().default.filename !== "string" && _commander().default.babelrc !== false) {
|
||||
if (commander.verbose && commander.quiet) {
|
||||
errors.push("--verbose and --quiet cannot be used together");
|
||||
}
|
||||
|
||||
if (!commander.outDir && filenames.length === 0 && typeof commander.filename !== "string" && commander.babelrc !== false) {
|
||||
errors.push("stdin compilation requires either -f/--filename [filename] or --no-babelrc");
|
||||
}
|
||||
|
||||
if (commander.keepFileExtension && commander.outFileExtension) {
|
||||
errors.push("--out-file-extension cannot be used with --keep-file-extension");
|
||||
}
|
||||
|
||||
if (errors.length) {
|
||||
console.error("babel:");
|
||||
errors.forEach(function (e) {
|
||||
console.error(" " + e);
|
||||
});
|
||||
process.exit(2);
|
||||
return null;
|
||||
}
|
||||
|
||||
const opts = _commander().default.opts();
|
||||
|
||||
const opts = commander.opts();
|
||||
const babelOptions = {
|
||||
presets: opts.presets,
|
||||
plugins: opts.plugins,
|
||||
|
|
@ -219,14 +155,19 @@ function parseArgv(args) {
|
|||
sourceMaps: opts.sourceMaps,
|
||||
sourceFileName: opts.sourceFileName,
|
||||
sourceRoot: opts.sourceRoot,
|
||||
moduleRoot: opts.moduleRoot,
|
||||
moduleIds: opts.moduleIds,
|
||||
moduleId: opts.moduleId,
|
||||
babelrc: opts.babelrc === true ? undefined : opts.babelrc,
|
||||
highlightCode: opts.highlightCode === true ? undefined : opts.highlightCode,
|
||||
comments: opts.comments === true ? undefined : opts.comments
|
||||
};
|
||||
|
||||
if (!process.env.BABEL_8_BREAKING) {
|
||||
Object.assign(babelOptions, {
|
||||
moduleRoot: opts.moduleRoot,
|
||||
moduleIds: opts.moduleIds,
|
||||
moduleId: opts.moduleId
|
||||
});
|
||||
}
|
||||
|
||||
for (const key of Object.keys(babelOptions)) {
|
||||
if (babelOptions[key] === undefined) {
|
||||
delete babelOptions[key];
|
||||
|
|
@ -240,6 +181,7 @@ function parseArgv(args) {
|
|||
filenames,
|
||||
extensions: opts.extensions,
|
||||
keepFileExtension: opts.keepFileExtension,
|
||||
outFileExtension: opts.outFileExtension,
|
||||
watch: opts.watch,
|
||||
skipInitialBuild: opts.skipInitialBuild,
|
||||
incremental: opts.incremental,
|
||||
|
|
@ -247,8 +189,10 @@ function parseArgv(args) {
|
|||
outDir: opts.outDir,
|
||||
relative: opts.relative,
|
||||
copyFiles: opts.copyFiles,
|
||||
copyIgnored: opts.copyFiles && opts.copyIgnored,
|
||||
includeDotfiles: opts.includeDotfiles,
|
||||
verbose: opts.verbose,
|
||||
quiet: opts.quiet,
|
||||
deleteDirOnStart: opts.deleteDirOnStart,
|
||||
sourceMapTarget: opts.sourceMapTarget
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,17 +12,7 @@ exports.transform = transform;
|
|||
exports.compile = compile;
|
||||
exports.deleteDir = deleteDir;
|
||||
exports.requireChokidar = requireChokidar;
|
||||
exports.adjustRelative = adjustRelative;
|
||||
|
||||
function _fsReaddirRecursive() {
|
||||
const data = _interopRequireDefault(require("fs-readdir-recursive"));
|
||||
|
||||
_fsReaddirRecursive = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
exports.withExtension = withExtension;
|
||||
|
||||
function babel() {
|
||||
const data = _interopRequireWildcard(require("@babel/core"));
|
||||
|
|
@ -34,67 +24,56 @@ function babel() {
|
|||
return data;
|
||||
}
|
||||
|
||||
function _includes() {
|
||||
const data = _interopRequireDefault(require("lodash/includes"));
|
||||
function _module() {
|
||||
const data = require("module");
|
||||
|
||||
_includes = function () {
|
||||
_module = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require("path"));
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
_path = function () {
|
||||
return data;
|
||||
};
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
return data;
|
||||
}
|
||||
const readdirRecursive = require("fs-readdir-recursive");
|
||||
|
||||
function _fs() {
|
||||
const data = _interopRequireDefault(require("fs"));
|
||||
const path = require("path");
|
||||
|
||||
_fs = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
const fs = require("fs");
|
||||
|
||||
function chmod(src, dest) {
|
||||
_fs().default.chmodSync(dest, _fs().default.statSync(src).mode);
|
||||
try {
|
||||
fs.chmodSync(dest, fs.statSync(src).mode);
|
||||
} catch (err) {
|
||||
console.warn(`Cannot change permissions of ${dest}`);
|
||||
}
|
||||
}
|
||||
|
||||
function readdir(dirname, includeDotfiles, filter) {
|
||||
return (0, _fsReaddirRecursive().default)(dirname, (filename, _index, currentDirectory) => {
|
||||
const stat = _fs().default.statSync(_path().default.join(currentDirectory, filename));
|
||||
|
||||
return readdirRecursive(dirname, (filename, _index, currentDirectory) => {
|
||||
const stat = fs.statSync(path.join(currentDirectory, filename));
|
||||
if (stat.isDirectory()) return true;
|
||||
return (includeDotfiles || filename[0] !== ".") && (!filter || filter(filename));
|
||||
});
|
||||
}
|
||||
|
||||
function readdirForCompilable(dirname, includeDotfiles) {
|
||||
return readdir(dirname, includeDotfiles, isCompilableExtension);
|
||||
function readdirForCompilable(dirname, includeDotfiles, altExts) {
|
||||
return readdir(dirname, includeDotfiles, function (filename) {
|
||||
return isCompilableExtension(filename, altExts);
|
||||
});
|
||||
}
|
||||
|
||||
function isCompilableExtension(filename, altExts) {
|
||||
const exts = altExts || babel().DEFAULT_EXTENSIONS;
|
||||
|
||||
const ext = _path().default.extname(filename);
|
||||
|
||||
return (0, _includes().default)(exts, ext);
|
||||
const ext = path.extname(filename);
|
||||
return exts.includes(ext);
|
||||
}
|
||||
|
||||
function addSourceMappingUrl(code, loc) {
|
||||
return code + "\n//# sourceMappingURL=" + _path().default.basename(loc);
|
||||
return code + "\n//# sourceMappingURL=" + path.basename(loc);
|
||||
}
|
||||
|
||||
const CALLER = {
|
||||
|
|
@ -125,39 +104,35 @@ function compile(filename, opts) {
|
|||
}
|
||||
|
||||
function deleteDir(path) {
|
||||
if (_fs().default.existsSync(path)) {
|
||||
_fs().default.readdirSync(path).forEach(function (file) {
|
||||
if (fs.existsSync(path)) {
|
||||
fs.readdirSync(path).forEach(function (file) {
|
||||
const curPath = path + "/" + file;
|
||||
|
||||
if (_fs().default.lstatSync(curPath).isDirectory()) {
|
||||
if (fs.lstatSync(curPath).isDirectory()) {
|
||||
deleteDir(curPath);
|
||||
} else {
|
||||
_fs().default.unlinkSync(curPath);
|
||||
fs.unlinkSync(curPath);
|
||||
}
|
||||
});
|
||||
|
||||
_fs().default.rmdirSync(path);
|
||||
fs.rmdirSync(path);
|
||||
}
|
||||
}
|
||||
|
||||
process.on("uncaughtException", function (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
process.exitCode = 1;
|
||||
});
|
||||
|
||||
function requireChokidar() {
|
||||
try {
|
||||
return require("chokidar");
|
||||
return parseInt(process.versions.node) >= 8 ? require("chokidar") : require("@nicolo-ribaudo/chokidar-2");
|
||||
} catch (err) {
|
||||
console.error("The optional dependency chokidar failed to install and is required for " + "--watch. Chokidar is likely not supported on your platform.");
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
function adjustRelative(relative, keepFileExtension) {
|
||||
if (keepFileExtension) {
|
||||
return relative;
|
||||
}
|
||||
|
||||
return relative.replace(/\.(\w*?)$/, "") + ".js";
|
||||
function withExtension(filename, ext = ".js") {
|
||||
const newBasename = path.basename(filename, path.extname(filename)) + ext;
|
||||
return path.join(path.dirname(filename), newBasename);
|
||||
}
|
||||
|
|
@ -1,14 +1,19 @@
|
|||
{
|
||||
"name": "@babel/cli",
|
||||
"version": "7.1.2",
|
||||
"version": "7.13.14",
|
||||
"description": "Babel command line.",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-cli",
|
||||
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20cli%22+is%3Aopen",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-cli",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-cli"
|
||||
},
|
||||
"keywords": [
|
||||
"6to5",
|
||||
"babel",
|
||||
|
|
@ -19,25 +24,26 @@
|
|||
"compiler"
|
||||
],
|
||||
"dependencies": {
|
||||
"commander": "^2.8.1",
|
||||
"commander": "^4.0.1",
|
||||
"convert-source-map": "^1.1.0",
|
||||
"fs-readdir-recursive": "^1.1.0",
|
||||
"glob": "^7.0.0",
|
||||
"lodash": "^4.17.10",
|
||||
"mkdirp": "^0.5.1",
|
||||
"output-file-sync": "^2.0.0",
|
||||
"slash": "^2.0.0",
|
||||
"lodash": "^4.17.19",
|
||||
"make-dir": "^2.1.0",
|
||||
"slash": "condition:BABEL_8_BREAKING ? ^3.0.0 : ^2.0.0",
|
||||
"source-map": "^0.5.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"chokidar": "^2.0.3"
|
||||
"@nicolo-ribaudo/chokidar-2": "condition:BABEL_8_BREAKING ? : 2.1.8-no-fsevents",
|
||||
"chokidar": "^3.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.0.0",
|
||||
"@babel/helper-fixtures": "^7.0.0"
|
||||
"@babel/core": "workspace:*",
|
||||
"@babel/helper-fixtures": "workspace:*",
|
||||
"rimraf": "^3.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"babel": "./bin/babel.js",
|
||||
|
|
|
|||
18
package.json
18
package.json
|
|
@ -16,15 +16,15 @@
|
|||
"build-full": "node build full"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/cli": "^7.2.3",
|
||||
"@babel/core": "^7.3.3",
|
||||
"@babel/plugin-proposal-class-properties": "^7.3.3",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
|
||||
"@babel/plugin-transform-member-expression-literals": "^7.2.0",
|
||||
"@babel/plugin-transform-property-literals": "^7.2.0",
|
||||
"@babel/plugin-transform-react-jsx": "^7.3.0",
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@babel/preset-typescript": "^7.3.3",
|
||||
"@babel/cli": "^7.13.14",
|
||||
"@babel/core": "^7.13.15",
|
||||
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
|
||||
"@babel/plugin-transform-member-expression-literals": "^7.12.13",
|
||||
"@babel/plugin-transform-property-literals": "^7.12.13",
|
||||
"@babel/plugin-transform-react-jsx": "^7.13.12",
|
||||
"@babel/preset-env": "^7.13.15",
|
||||
"@babel/preset-typescript": "^7.13.0",
|
||||
"google-auth-library": "^3.1.0",
|
||||
"image-size": "^0.7.2",
|
||||
"output-file-sync": "^2.0.1"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user