mirror of https://github.com/embarklabs/embark.git
support directive
This commit is contained in:
parent
61e44b31e9
commit
8e349cc6ed
|
@ -249,7 +249,7 @@ Config.prototype.loadFiles = function(files) {
|
|||
|
||||
readFiles.push({filename: 'embark.js', content: fs.readFileSync(fs.embarkPath("js/build/embark.bundle.js")).toString(), path: fs.embarkPath("js/build/embark.bundle.js")});
|
||||
}
|
||||
if (file.indexOf("web3-") == 0) {
|
||||
if (file.indexOf("web3-") === 0) {
|
||||
let web3Version = file.split('web3-')[1].split(".js")[0];
|
||||
npm.getPackageVersion('web3', web3Version, function(web3Content) {
|
||||
self.logger.error('downloaded web3');
|
||||
|
|
|
@ -67,5 +67,5 @@ module.exports = {
|
|||
});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ module.exports = {
|
|||
let gitHash = registryJSON.gitHead;
|
||||
let repo = registryJSON.homepage.split("github.com/")[1];
|
||||
|
||||
let gitUrl = "http://raw.githubusercontent.com/" + repo + "/" + gitHash + "/dist/" + packageName + ".js"
|
||||
let gitUrl = "http://raw.githubusercontent.com/" + repo + "/" + gitHash + "/dist/" + packageName + ".js";
|
||||
utils.httpGet(gitUrl, function (res2) {
|
||||
let body = '';
|
||||
res2.on('data', function (d) {
|
||||
|
|
|
@ -23,11 +23,12 @@ class Pipeline {
|
|||
|
||||
let pipelinePlugins = this.plugins.getPluginsFor('pipeline');
|
||||
|
||||
if (file.filename[0] === '$') {
|
||||
if (file.filename === "$ALL_CONTRACTS") {
|
||||
return {content: abi, filename: file.filename, path: file.path, modified: true};
|
||||
} else if (file.filename[0] === '$') {
|
||||
let contractName = file.filename.substr(1);
|
||||
return {content: this.buildContractJS(contractName), filename: contractName + ".js", path: file.path, modified: true};
|
||||
}
|
||||
else if (file.filename === 'embark.js') {
|
||||
} else if (file.filename === 'embark.js') {
|
||||
return {content: file.content + "\n" + abi, filename: file.filename, path: file.path, modified: true};
|
||||
} else if (file.filename === 'abi.js') {
|
||||
return {content: abi, filename: file.filename, path: file.path, modified: true};
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
"test.html": "app/test.html",
|
||||
"test2.html": "app/test2.html",
|
||||
"js/myweb3.js": "web3-0.18.js",
|
||||
"js/web3.js": "web3.js"
|
||||
"js/web3.js": "web3.js",
|
||||
"js/all_contracts.js": "$ALL_CONTRACTS"
|
||||
},
|
||||
"buildDir": "dist/",
|
||||
"config": "config/",
|
||||
|
|
Loading…
Reference in New Issue