Skip to content

Commit 9a5c390

Browse files
committed
update meteor commands
1 parent 92d37fd commit 9a5c390

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

bin/embark

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ var run = function(cmd) {
1414
}
1515
}
1616

17+
var deploy = fnction(embarkConfig) {
18+
contractFiles = grunt.file.expand(embarkConfig.contracts);
19+
destFile = embarkConfig.output
20+
Embark.init()
21+
Embark.blockchainConfig.loadConfigFile(embarkConfig.blockchainConfig)
22+
Embark.contractsConfig.loadConfigFile(embarkConfig.contractsConfig)
23+
abi = Embark.deployContracts(env, contractFiles, destFile)
24+
grunt.file.write(destFile, abi);
25+
}
26+
1727
program
1828
.version('0.6.0')
1929

@@ -39,13 +49,7 @@ program.command('deploy [env]').description('deploy contracts').action(function(
3949
run("grunt deploy_contracts:" + env);
4050
}
4151
else {
42-
contractFiles = grunt.file.expand(embarkConfig.contracts);
43-
destFile = embarkConfig.output
44-
Embark.init()
45-
Embark.blockchainConfig.loadConfigFile(embarkConfig.blockchainConfig)
46-
Embark.contractsConfig.loadConfigFile(embarkConfig.contractsConfig)
47-
abi = Embark.deployContracts(env, contractFiles, destFile)
48-
grunt.file.write(destFile, abi);
52+
deploy();
4953
}
5054
});
5155

@@ -59,7 +63,7 @@ program.command('build [env]').description('build dapp').action(function(env_) {
5963
run('grunt build:' + env);
6064
}
6165
else if (embarkConfig.type === "meteor") {
62-
//deploy
66+
deploy();
6367
run("meteor-build-client ./build -p ''");
6468
}
6569
});
@@ -75,9 +79,8 @@ program.command('ipfs [env]').description('build dapp and make it available in i
7579
run('grunt ipfs:' + env)
7680
}
7781
else if (embarkConfig.type === "meteor") {
78-
//deploy
79-
//build
80-
Embark = require('embark-framework')
82+
deploy();
83+
run("meteor-build-client ./build -p ''");
8184
Embark.release.ipfs("build/")
8285
}
8386
else {
@@ -106,6 +109,7 @@ program.command('spec').description('run specs').action(function() {
106109
}
107110
else {
108111
console.log("command not available in meteor or manual mode yet");
112+
console.log("note: you can use embark tests with any framework");
109113
}
110114
});
111115

0 commit comments

Comments
 (0)