Skip to content

Commit

Permalink
Merge 19a554c into 7649f30
Browse files Browse the repository at this point in the history
  • Loading branch information
Coobaha committed May 24, 2016
2 parents 7649f30 + 19a554c commit 417860d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ module.exports.check = function(request) {
module.exports.checkBabel = function checkBabel() {
try {
var babelrc = require.resolve(path.join(process.cwd(), ".babelrc"));
var babelOpts = JSON.parse(fs.readFileSync(babelrc, "utf8"));
} catch (e) {
if (babelrc) {
console.info(".babelrc is invalid JSON, babel deps are skipped")
}
// Babel isn't installed, don't install deps
return;
}
Expand All @@ -83,7 +87,7 @@ module.exports.checkBabel = function checkBabel() {
var options = Object.assign({
plugins: [],
presets: [],
}, JSON.parse(fs.readFileSync(babelrc, "utf8")));
}, babelOpts);

if (!options.env) {
options.env = {};
Expand Down

0 comments on commit 417860d

Please sign in to comment.