Skip to content

Commit 88866f1

Browse files
committed
add meteor build and ipfs support
1 parent ea16259 commit 88866f1

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

bin/embark

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ program.command('build [env]').description('build dapp').action(function(env_) {
5858
run("grunt deploy_contracts:" + env);
5959
run('grunt build:' + env);
6060
}
61+
else if (embarkConfig.type === "meteor") {
62+
//deploy
63+
run("meteor-build-client ./build -p ''");
64+
}
6165
});
6266

6367
program.command('ipfs [env]').description('build dapp and make it available in ipfs').action(function(env_) {
@@ -70,8 +74,14 @@ program.command('ipfs [env]').description('build dapp and make it available in i
7074
run('grunt build:' + env)
7175
run('grunt ipfs:' + env)
7276
}
77+
else if (embarkConfig.type === "meteor") {
78+
//deploy
79+
//build
80+
Embark = require('embark-framework')
81+
Embark.release.ipfs("build/")
82+
}
7383
else {
74-
console.log("command not available in meteor or manual mode yet");
84+
console.log("command not available in manual mode yet");
7585
}
7686
});
7787

lib/ipfs.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
require('shelljs/global');
22

3-
ipfs = function() {
3+
ipfs = function(build_dir) {
44
ipfs_path = "~/go/bin";
55

6-
build_dir = "dist/dapp/";
7-
86
cmd = ipfs_path + "/ipfs add -r " + build_dir;
97

108
console.log("=== adding " + cmd + " to ipfs");

tasks/ipfs.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ module.exports = (grunt) ->
33
grunt.registerTask "ipfs", "distribute into ipfs", (env_) =>
44
env = env_ || "development"
55
Embark = require('embark-framework')
6-
Embark.release.ipfs()
6+
Embark.release.ipfs("dist/dapp/")
77

0 commit comments

Comments
 (0)