convert CLI imports to ES6

This commit is contained in:
Sebastian McKenzie
2015-07-24 21:10:11 +01:00
parent 3d416a6fbe
commit 07e1ce8bf4
3 changed files with 16 additions and 22 deletions

View File

@@ -1,15 +1,12 @@
#!/usr/bin/env node
var pathIsAbsolute = require("path-is-absolute");
var commander = require("commander");
var Module = require("module");
var babel = require("babel-core");
var inspect = require("util").inspect;
var path = require("path");
var repl = require("repl");
var util = require("babel-core").util;
var vm = require("vm");
var _ = require("lodash");
import pathIsAbsolute from "path-is-absolute";
import commander from "commander";
import Module from "module";
import { inspect } from "util";
import path from "path";
import repl from "repl";
import babel, { util } from "babel-core";
import vm from "vm";
import _ from "lodash";
var program = new commander.Command("babel-node");

View File

@@ -1,6 +1,5 @@
var commander = require("commander");
var util = require("babel-core").util;
var runtime = require("babel-core").buildExternalHelpers;
import commander from "commander";
import { util, runtime } from "babel-core";
commander.option("-l, --whitelist [whitelist]", "Whitelist of helpers to ONLY include", util.list);
commander.option("-t, --output-type [type]", "Type of output (global|umd|var)", "global");

View File

@@ -1,10 +1,8 @@
#!/usr/bin/env node
var pathExists = require("path-exists");
var readline = require("readline");
var child = require("child_process");
var path = require("path");
var fs = require("fs");
import pathExists from "path-exists";
import readline from "readline";
import child from "child_process";
import path from "path";
import fs from "fs";
function spawn(cmd, args, callback) {
console.log(">", cmd, args);