Skip to content

Commit

Permalink
Run compilation sync so that brunch does not read the output too soon
Browse files Browse the repository at this point in the history
I think this fixes #6
  • Loading branch information
joakimk committed Feb 9, 2016
1 parent 90403aa commit 63e268d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@
info += ', to ' + outputFile;
console.log(info);

childProcess.exec('elm make --yes --output ' + outputFile + ' ' + srcFile, {cwd: elmFolder}, function (error, stdout, stderr){
return callback(error, error ? stderr : '');
});
var command = 'elm make --yes --output ' + outputFile + ' ' + srcFile;

try {
childProcess.execSync(command, { cwd: elmFolder })
callback(null, "");
} catch (error) {
callback(error, "");
}
};

}).call(this);

0 comments on commit 63e268d

Please sign in to comment.