Commit cd460b5e authored by Jon Moore's avatar Jon Moore
Browse files

delete all node modules

parent 29821387
../stream-throttle/bin/throttleproxy.js
\ No newline at end of file
../tree-kill/cli.js
\ No newline at end of file
../uglify-js/bin/uglifyjs
\ No newline at end of file
../uuid/bin/uuid
\ No newline at end of file
../@cnakazawa/watch/cli.js
\ No newline at end of file
../webpack-cli/bin/cli.js
\ No newline at end of file
../webpack-dev-server/bin/webpack-dev-server.js
\ No newline at end of file
../which/bin/which
\ No newline at end of file
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# @babel/cli
> Babel command line.
See our website [@babel/cli](https://babeljs.io/docs/en/next/babel-cli.html) 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
```
#!/usr/bin/env node
require("../lib/babel-external-helpers");
#!/usr/bin/env node
require("../lib/babel");
throw new Error("Use the `@babel/core` package instead of `@babel/cli`.");
"use strict";
function _commander() {
const data = _interopRequireDefault(require("commander"));
_commander = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function collect(value, previousValue) {
if (typeof value !== "string") return previousValue;
const values = value.split(",");
return previousValue ? previousValue.concat(values) : values;
}
_commander().default.option("-l, --whitelist [whitelist]", "Whitelist of helpers to ONLY include", collect);
_commander().default.option("-t, --output-type [type]", "Type of output (global|umd|var)", "global");
_commander().default.usage("[options]");
_commander().default.parse(process.argv);
console.log((0, _core().buildExternalHelpers)(_commander().default.whitelist, _commander().default.outputType));
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
function _default(_x) {
return _ref.apply(this, arguments);
}
function _ref() {
_ref = _asyncToGenerator(function* ({
cliOptions,
babelOptions
}) {
const filenames = cliOptions.filenames;
function write(_x2, _x3) {
return _write.apply(this, arguments);
}
function _write() {
_write = _asyncToGenerator(function* (src, base) {
let relative = _path().default.relative(base, src);
if (!util.isCompilableExtension(relative, cliOptions.extensions)) {
return false;
}
relative = util.adjustRelative(relative, cliOptions.keepFileExtension);
const dest = getDest(relative, base);
try {
const res = yield util.compile(src, (0, _defaults().default)({
sourceFileName: (0, _slash().default)(_path().default.relative(dest + "/..", src))
}, babelOptions));
if (!res) return false;
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));
}
(0, _outputFileSync().default)(dest, res.code);
util.chmod(src, dest);
if (cliOptions.verbose) {
console.log(src + " -> " + dest);
}
return true;
} catch (err) {
if (cliOptions.watch) {
console.error(err);
return false;
}
throw err;
}
});
return _write.apply(this, arguments);
}
function getDest(filename, base) {
if (cliOptions.relative) {
return _path().default.join(base, cliOptions.outDir, filename);
}
return _path().default.join(cliOptions.outDir, filename);
}
function handleFile(_x4, _x5) {
return _handleFile.apply(this, arguments);
}
function _handleFile() {
_handleFile = _asyncToGenerator(function* (src, base) {
const written = yield write(src, base);
if (!written && cliOptions.copyFiles) {
const filename = _path().default.relative(base, src);
const dest = getDest(filename, base);
(0, _outputFileSync().default)(dest, _fs().default.readFileSync(src));
util.chmod(src, dest);
}
return written;
});
return _handleFile.apply(this, arguments);
}
function handle(_x6) {
return _handle.apply(this, arguments);
}
function _handle() {
_handle = _asyncToGenerator(function* (filenameOrDir) {
if (!_fs().default.existsSync(filenameOrDir)) return 0;
const stat = _fs().default.statSync(filenameOrDir);
if (stat.isDirectory()) {
const dirname = filenameOrDir;
let count = 0;
const files = util.readdir(dirname, cliOptions.includeDotfiles);
for (const filename of files) {
const src = _path().default.join(dirname, filename);
const written = yield handleFile(src, dirname);
if (written) count += 1;
}
return count;
} else {
const filename = filenameOrDir;
const written = yield handleFile(filename, _path().default.dirname(filename));
return written ? 1 : 0;
}
});
return _handle.apply(this, arguments);
}
if (!cliOptions.skipInitialBuild) {
if (cliOptions.deleteDirOnStart) {
util.deleteDir(cliOptions.outDir);
}
(0, _mkdirp().sync)(cliOptions.outDir);
let compiledFiles = 0;
for (const filename of cliOptions.filenames) {
compiledFiles += yield handle(filename);
}
console.log(`Successfully compiled ${compiledFiles} ${compiledFiles !== 1 ? "files" : "file"} with Babel.`);
}
if (cliOptions.watch) {
const chokidar = util.requireChokidar();
filenames.forEach(function (filenameOrDir) {
const watcher = chokidar.watch(filenameOrDir, {
persistent: true,
ignoreInitial: true,
awaitWriteFinish: {
stabilityThreshold: 50,
pollInterval: 10
}
});
["add", "change"].forEach(function (type) {
watcher.on(type, function (filename) {
handleFile(filename, filename === filenameOrDir ? _path().default.dirname(filenameOrDir) : filenameOrDir).catch(err => {
console.error(err);
});
});
});
});
}
});
return _ref.apply(this, arguments);
}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
function _convertSourceMap() {
const data = _interopRequireDefault(require("convert-source-map"));
_convertSourceMap = function () {
return data;
};
return data;
}
function _defaults() {
const data = _interopRequireDefault(require("lodash/defaults"));
_defaults = function () {
return data;
};
return data;
}
function _sourceMap() {
const data = _interopRequireDefault(require("source-map"));
_sourceMap = 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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
function _default(_x) {
return _ref.apply(this, arguments);
}
function _ref() {
_ref = _asyncToGenerator(function* ({
cliOptions,
babelOptions
}) {
function buildResult(fileResults) {
const map = new (_sourceMap().default.SourceMapGenerator)({
file: cliOptions.sourceMapTarget || _path().default.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().default.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().default.fromObject(map).toComment();
}
return {
map: map,
code: code
};
}
function output(fileResults) {
const result = buildResult(fileResults);
if (cliOptions.outFile) {
if (babelOptions.sourceMaps && babelOptions.sourceMaps !== "inline") {
const mapLoc = cliOptions.outFile + ".map";
result.code = util.addSourceMappingUrl(result.code, mapLoc);
_fs().default.writeFileSync(mapLoc, JSON.stringify(result.map));
}
_fs().default.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);
});
}
function stdin() {
return _stdin.apply(this, arguments);
}
function _stdin() {
_stdin = _asyncToGenerator(function* () {
const code = yield readStdin();
const res = yield util.transform(cliOptions.filename, code, (0, _defaults().default)({
sourceFileName: "stdin"
}, babelOptions));
output([res]);
});
return _stdin.apply(this, arguments);
}
function walk(_x2) {
return _walk.apply(this, arguments);
}
function _walk() {
_walk = _asyncToGenerator(function* (filenames) {
const _filenames = [];
filenames.forEach(function (filename) {
if (!_fs().default.existsSync(filename)) return;
const stat = _fs().default.statSync(filename);
if (stat.isDirectory()) {
const dirname = filename;
util.readdirForCompilable(filename, cliOptions.includeDotfiles, cliOptions.extensions).forEach(function (filename) {
_filenames.push(_path().default.join(dirname, filename));
});
} else {
_filenames.push(filename);
}
});
const results = yield Promise.all(_filenames.map(function () {
var _ref2 = _asyncToGenerator(function* (filename) {
let sourceFilename = filename;
if (cliOptions.outFile) {
sourceFilename = _path().default.relative(_path().default.dirname(cliOptions.outFile), sourceFilename);
}
sourceFilename = (0, _slash().default)(sourceFilename);
try {
return yield util.compile(filename, (0, _defaults().default)({
sourceFileName: sourceFilename,
sourceMaps: babelOptions.sourceMaps === "inline" ? true : babelOptions.sourceMaps
}, babelOptions));
} catch (err) {
if (!cliOptions.watch) {
throw err;
}
console.error(err);
return null;
}
});
return function (_x4) {
return _ref2.apply(this, arguments);
};
}()));
output(results);
});
return _walk.apply(this, arguments);
}