add meteor build and ipfs support

This commit is contained in:
Iuri Matias 2015-07-12 22:11:59 -04:00
parent ea16259f34
commit 88866f1357
3 changed files with 13 additions and 5 deletions

View File

@ -58,6 +58,10 @@ program.command('build [env]').description('build dapp').action(function(env_) {
run("grunt deploy_contracts:" + env); run("grunt deploy_contracts:" + env);
run('grunt build:' + env); run('grunt build:' + env);
} }
else if (embarkConfig.type === "meteor") {
//deploy
run("meteor-build-client ./build -p ''");
}
}); });
program.command('ipfs [env]').description('build dapp and make it available in ipfs').action(function(env_) { 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
run('grunt build:' + env) run('grunt build:' + env)
run('grunt ipfs:' + env) run('grunt ipfs:' + env)
} }
else if (embarkConfig.type === "meteor") {
//deploy
//build
Embark = require('embark-framework')
Embark.release.ipfs("build/")
}
else { else {
console.log("command not available in meteor or manual mode yet"); console.log("command not available in manual mode yet");
} }
}); });

View File

@ -1,10 +1,8 @@
require('shelljs/global'); require('shelljs/global');
ipfs = function() { ipfs = function(build_dir) {
ipfs_path = "~/go/bin"; ipfs_path = "~/go/bin";
build_dir = "dist/dapp/";
cmd = ipfs_path + "/ipfs add -r " + build_dir; cmd = ipfs_path + "/ipfs add -r " + build_dir;
console.log("=== adding " + cmd + " to ipfs"); console.log("=== adding " + cmd + " to ipfs");

View File

@ -3,5 +3,5 @@ module.exports = (grunt) ->
grunt.registerTask "ipfs", "distribute into ipfs", (env_) => grunt.registerTask "ipfs", "distribute into ipfs", (env_) =>
env = env_ || "development" env = env_ || "development"
Embark = require('embark-framework') Embark = require('embark-framework')
Embark.release.ipfs() Embark.release.ipfs("dist/dapp/")