fix filenameRelative name and remove amdModuleIds

This commit is contained in:
Sebastian McKenzie 2015-01-23 09:39:42 +11:00
parent dc209417e7
commit bff150f69d
5 changed files with 10 additions and 7 deletions

View File

@ -22,7 +22,6 @@ commander.option("--loose [list]", "List of transformers to enable their loose m
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("-c, --remove-comments", "Remove comments from the compiled code", false);
commander.option("-a, --amd-module-ids", "Insert module id in AMD modules", false); // todo: remove in 3.0.0
commander.option("-m, --module-ids", "Insert module id in modules", false);
commander.option("-R, --react-compat", "Makes the react transformer produce pre-v0.12 code");
commander.option("-E, --include-regenerator", "Include the regenerator runtime if necessary", false);
@ -100,7 +99,7 @@ exports.opts = {
experimental: commander.experimental,
reactCompat: commander.reactCompat,
playground: commander.playground,
moduleIds: commander.amdModuleIds || commander.moduleIds,
moduleIds: commander.moduleIds,
blacklist: commander.blacklist,
whitelist: commander.whitelist,
sourceMap: commander.sourceMaps || commander.sourceMapsInline,

View File

@ -48,9 +48,10 @@ File.helpers = [
File.validOptions = [
"filename",
"fileNameRelative",
"filenameRelative",
"blacklist",
"whitelist",
"loose",
"optional",
"modules",
"sourceMap",
@ -85,7 +86,7 @@ File.normaliseOptions = function (opts) {
reactCompat: false,
playground: false,
whitespace: true,
moduleIds: opts.amdModuleIds || false,
moduleIds: false,
blacklist: [],
whitelist: [],
sourceMap: false,

View File

@ -49,8 +49,11 @@ var run = function (task, done) {
var execCode = exec.code;
var result;
var noCheckAst = opts.noCheckAst;
delete opts.noCheckAst;
var checkAst = function (result) {
if (opts.noCheckAst) return;
if (noCheckAst) return;
var errors = esvalid.errors(result.ast.program);
if (errors.length) {

View File

@ -1,3 +1,3 @@
{
"amdModuleIds": true
"moduleIds": true
}

View File

@ -1,3 +1,3 @@
{
"amdModuleIds": true
"moduleIds": true
}