use path join
This commit is contained in:
parent
60f487da38
commit
549e33317b
|
@ -1,6 +1,7 @@
|
|||
var fs = require('fs');
|
||||
var grunt = require('grunt');
|
||||
var merge = require('merge');
|
||||
var path = require('path');
|
||||
|
||||
// TODO: add wrapper for fs so it can also work in the browser
|
||||
// can work with both read and save
|
||||
|
@ -81,11 +82,9 @@ Config.prototype.loadFiles = function(files) {
|
|||
return file.indexOf('.') >= 0;
|
||||
}).filter(function(file) {
|
||||
if (file === 'embark.js') {
|
||||
//readFiles.push({filename: 'bluebird.js', content: fs.readFileSync("../js/bluebird.js").toString()});
|
||||
readFiles.push({filename: 'web3.js', content: fs.readFileSync(__dirname + "/../js/web3.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: '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()});
|
||||
readFiles.push({filename: 'web3.js', content: fs.readFileSync(path.join(__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(path.join(__dirname, "/../js/build/embark.bundle.js")).toString()});
|
||||
} else {
|
||||
readFiles.push({filename: file, content: fs.readFileSync(file).toString()});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue