use path join

This commit is contained in:
Iuri Matias 2016-10-29 13:50:54 -04:00
parent 60f487da38
commit 549e33317b

View File

@ -1,6 +1,7 @@
var fs = require('fs'); var fs = require('fs');
var grunt = require('grunt'); var grunt = require('grunt');
var merge = require('merge'); var merge = require('merge');
var path = require('path');
// TODO: add wrapper for fs so it can also work in the browser // TODO: add wrapper for fs so it can also work in the browser
// can work with both read and save // can work with both read and save
@ -81,11 +82,9 @@ Config.prototype.loadFiles = function(files) {
return file.indexOf('.') >= 0; return file.indexOf('.') >= 0;
}).filter(function(file) { }).filter(function(file) {
if (file === 'embark.js') { if (file === 'embark.js') {
//readFiles.push({filename: 'bluebird.js', content: fs.readFileSync("../js/bluebird.js").toString()}); readFiles.push({filename: 'web3.js', content: fs.readFileSync(path.join(__dirname, "/../js/web3.js")).toString()});
readFiles.push({filename: 'web3.js', content: fs.readFileSync(__dirname + "/../js/web3.js").toString()}); readFiles.push({filename: 'ipfs.js', content: fs.readFileSync(path.join(__dirname, "/../js/ipfs.js")).toString()});
//readFiles.push({filename: 'embark.js', content: fs.readFileSync("../js/ipfs.js").toString()+ fs.readFileSync("../js/build/embark.bundle.js").toString()}); readFiles.push({filename: 'embark.js', content: fs.readFileSync(path.join(__dirname, "/../js/build/embark.bundle.js")).toString()});
readFiles.push({filename: 'ipfs.js', content: fs.readFileSync(__dirname + "/../js/ipfs.js").toString()});
readFiles.push({filename: 'embark.js', content: fs.readFileSync(__dirname + "/../js/build/embark.bundle.js").toString()});
} else { } else {
readFiles.push({filename: file, content: fs.readFileSync(file).toString()}); readFiles.push({filename: file, content: fs.readFileSync(file).toString()});
} }