Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/jsx-command.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ class JSXCommand {
}
if (optarg == "release") {
optimizeCommands = Optimizer.getReleaseOptimizationCommands();
} else if (optarg == "development") {
optimizeCommands = Optimizer.getDevelopmentOptimizationCommands();
} else {
optimizeCommands = optimizeCommands.concat(optarg.split(","));
}
Expand Down
11 changes: 11 additions & 0 deletions src/optimizer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,17 @@ class Optimizer {
];
}

static function getDevelopmentOptimizationCommands() : string[] {
var disabled = [
"no-assert",
"no-log",
"no-debug"
];
return Optimizer.getReleaseOptimizationCommands().filter(function (cmd) {
return disabled.indexOf(cmd) == -1;
});
}

function constructor () {
this._compiler = null;
this._commands = new _OptimizeCommand[];
Expand Down