style fixes

This commit is contained in:
Sebastian McKenzie
2015-02-05 08:27:59 +11:00
parent a786f39b1b
commit dc7e963c9f
3 changed files with 13 additions and 11 deletions

View File

@@ -75,6 +75,4 @@ exports.JSXClosingElement = function (node, print) {
this.push(">");
};
exports.JSXEmptyExpression = function () {
};
exports.JSXEmptyExpression = function () {};

View File

@@ -12,14 +12,6 @@ exports.save = function () {
};
exports.load = function () {
if (!fs.existsSync(FILENAME)) return;
try {
data = JSON.parse(fs.readFileSync(FILENAME));
} catch (err) {
return;
}
process.on("exit", exports.save);
var sigint = function () {
@@ -29,6 +21,14 @@ exports.load = function () {
};
process.on("SIGINT", sigint);
if (!fs.existsSync(FILENAME)) return;
try {
data = JSON.parse(fs.readFileSync(FILENAME));
} catch (err) {
return;
}
};
exports.get = function () {

View File

@@ -60,6 +60,10 @@ var astVisitor = {
exports.optional = true;
exports.manipulateOptions = function (opts) {
if (opts.whitelist.length) opts.whitelist.push("es6.modules");
};
exports.ast = {
enter: function (ast, file) {
file.setDynamic("runtimeIdentifier", function () {