mirror of https://github.com/embarklabs/embark.git
fix file writing, now working
This commit is contained in:
parent
d2d29be334
commit
e85d8b1ae5
|
@ -140,9 +140,7 @@ class Engine {
|
|||
|
||||
async.waterfall([
|
||||
function getWeb3Version(next) {
|
||||
console.log('Waiting for web3 version');
|
||||
self.events.request("version:get:web3", function(web3Version) {
|
||||
console.log('Web3 version', web3Version);
|
||||
next(null, web3Version);
|
||||
});
|
||||
},
|
||||
|
@ -221,7 +219,6 @@ class Engine {
|
|||
communicationConfig: self.config.communicationConfig,
|
||||
events: self.events
|
||||
});
|
||||
console.log('LISTEN TO COMMANDS');
|
||||
codeGenerator.listenToCommands();
|
||||
codeGenerator.buildEmbarkJS(function() {
|
||||
self.events.emit('code-generator-ready');
|
||||
|
|
|
@ -3,6 +3,7 @@ const async = require('async');
|
|||
const utils = require('../utils/utils.js');
|
||||
const webpack = require("webpack");
|
||||
const constants = require('../constants');
|
||||
const File = require('../core/file');
|
||||
|
||||
require("babel-preset-react");
|
||||
require("babel-preset-es2015");
|
||||
|
@ -11,6 +12,15 @@ require("babel-preset-es2017");
|
|||
|
||||
let pipeline;
|
||||
|
||||
// Override process.chdir so that we have a partial-implementation PWD for Windows
|
||||
const realChdir = process.chdir;
|
||||
process.chdir = (...args) => {
|
||||
if (!process.env.PWD) {
|
||||
process.env.PWD = process.cwd();
|
||||
}
|
||||
realChdir(...args);
|
||||
};
|
||||
|
||||
class Pipeline {
|
||||
|
||||
constructor(options) {
|
||||
|
@ -73,6 +83,7 @@ class Pipeline {
|
|||
// limit:1 due to issues when downloading required files such as web3.js
|
||||
async.mapLimit(files, 1,
|
||||
function(file, fileCb) {
|
||||
file = new File(file); // Re-instantiate a File as through the process, we lose its prototype
|
||||
self.log("reading " + file.filename);
|
||||
|
||||
if (file.filename.indexOf('.js') >= 0) {
|
||||
|
|
Loading…
Reference in New Issue