Skip to content

Commit 8e349cc

Browse files
committed
support directive
1 parent 61e44b3 commit 8e349cc

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

lib/core/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ Config.prototype.loadFiles = function(files) {
249249

250250
readFiles.push({filename: 'embark.js', content: fs.readFileSync(fs.embarkPath("js/build/embark.bundle.js")).toString(), path: fs.embarkPath("js/build/embark.bundle.js")});
251251
}
252-
if (file.indexOf("web3-") == 0) {
252+
if (file.indexOf("web3-") === 0) {
253253
let web3Version = file.split('web3-')[1].split(".js")[0];
254254
npm.getPackageVersion('web3', web3Version, function(web3Content) {
255255
self.logger.error('downloaded web3');

lib/core/run_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ module.exports = {
6767
});
6868

6969
}
70-
}
70+
};
7171

lib/pipeline/npm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
let gitHash = registryJSON.gitHead;
1818
let repo = registryJSON.homepage.split("github.com/")[1];
1919

20-
let gitUrl = "http://raw.githubusercontent.com/" + repo + "/" + gitHash + "/dist/" + packageName + ".js"
20+
let gitUrl = "http://raw.githubusercontent.com/" + repo + "/" + gitHash + "/dist/" + packageName + ".js";
2121
utils.httpGet(gitUrl, function (res2) {
2222
let body = '';
2323
res2.on('data', function (d) {

lib/pipeline/pipeline.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ class Pipeline {
2323

2424
let pipelinePlugins = this.plugins.getPluginsFor('pipeline');
2525

26-
if (file.filename[0] === '$') {
26+
if (file.filename === "$ALL_CONTRACTS") {
27+
return {content: abi, filename: file.filename, path: file.path, modified: true};
28+
} else if (file.filename[0] === '$') {
2729
let contractName = file.filename.substr(1);
2830
return {content: this.buildContractJS(contractName), filename: contractName + ".js", path: file.path, modified: true};
29-
}
30-
else if (file.filename === 'embark.js') {
31+
} else if (file.filename === 'embark.js') {
3132
return {content: file.content + "\n" + abi, filename: file.filename, path: file.path, modified: true};
3233
} else if (file.filename === 'abi.js') {
3334
return {content: abi, filename: file.filename, path: file.path, modified: true};

test_app/embark.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"test.html": "app/test.html",
1313
"test2.html": "app/test2.html",
1414
"js/myweb3.js": "web3-0.18.js",
15-
"js/web3.js": "web3.js"
15+
"js/web3.js": "web3.js",
16+
"js/all_contracts.js": "$ALL_CONTRACTS"
1617
},
1718
"buildDir": "dist/",
1819
"config": "config/",

0 commit comments

Comments
 (0)