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