diff --git a/bin/embark b/bin/embark index f8737d163..35ffc2d88 100644 --- a/bin/embark +++ b/bin/embark @@ -58,6 +58,10 @@ program.command('build [env]').description('build dapp').action(function(env_) { run("grunt deploy_contracts:" + 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_) { @@ -70,8 +74,14 @@ program.command('ipfs [env]').description('build dapp and make it available in i run('grunt build:' + env) run('grunt ipfs:' + env) } + else if (embarkConfig.type === "meteor") { + //deploy + //build + Embark = require('embark-framework') + Embark.release.ipfs("build/") + } else { - console.log("command not available in meteor or manual mode yet"); + console.log("command not available in manual mode yet"); } }); diff --git a/lib/ipfs.js b/lib/ipfs.js index 35c91c0f8..5fb505f78 100644 --- a/lib/ipfs.js +++ b/lib/ipfs.js @@ -1,10 +1,8 @@ require('shelljs/global'); -ipfs = function() { +ipfs = function(build_dir) { ipfs_path = "~/go/bin"; - build_dir = "dist/dapp/"; - cmd = ipfs_path + "/ipfs add -r " + build_dir; console.log("=== adding " + cmd + " to ipfs"); diff --git a/tasks/ipfs.coffee b/tasks/ipfs.coffee index 85b399169..f2b4dc2d7 100644 --- a/tasks/ipfs.coffee +++ b/tasks/ipfs.coffee @@ -3,5 +3,5 @@ module.exports = (grunt) -> grunt.registerTask "ipfs", "distribute into ipfs", (env_) => env = env_ || "development" Embark = require('embark-framework') - Embark.release.ipfs() + Embark.release.ipfs("dist/dapp/")