diff --git a/bin/embark b/bin/embark index 5cf6f390..c227bc88 100755 --- a/bin/embark +++ b/bin/embark @@ -67,7 +67,7 @@ program.command('build [env]').description('build dapp').action(function(env_) { if (embarkConfig.type === "grunt") { run("grunt clean"); run("grunt deploy_contracts:" + env); - run('grunt build:' + env); + run('grunt build --env=' + env); } else if (embarkConfig.type === "meteor") { deploy(env, embarkConfig); @@ -82,8 +82,8 @@ program.command('ipfs [env]').description('build dapp and make it available in i if (embarkConfig.type === "grunt") { run("grunt clean") run("grunt deploy_contracts:" + env) - run('grunt build:' + env) - run('grunt ipfs:' + env) + run('grunt build --env=' + env) + run('grunt ipfs --env=' + env) } else if (embarkConfig.type === "meteor") { deploy(env, embarkConfig); @@ -100,7 +100,7 @@ program.command('run [env]').description('run dapp').action(function(env_) { var embarkConfig = readYaml.sync("./embark.yml"); if (embarkConfig.type === "grunt") { - run('grunt deploy:' + env); + run('grunt deploy --env=' + env); } else { console.log("command not available in meteor or manual mode yet"); diff --git a/boilerplate/Gruntfile.coffee b/boilerplate/Gruntfile.coffee index 279c1816..daf1de9c 100644 --- a/boilerplate/Gruntfile.coffee +++ b/boilerplate/Gruntfile.coffee @@ -110,5 +110,7 @@ module.exports = (grunt) -> # Loads all plugins that match "grunt-", in this case all of our current plugins require('matchdep').filterAll('grunt-*').forEach(grunt.loadNpmTasks) - grunt.registerTask "deploy", ["coffee", "deploy_contracts", "concat", "copy", "server", "watch"] - grunt.registerTask "build", ["clean", "deploy_contracts", "coffee", "concat", "uglify", "copy"] + env = grunt.option('env') + + grunt.registerTask "deploy", ["coffee", "deploy_contracts:"+env, "concat", "copy", "server", "watch"] + grunt.registerTask "build", ["clean", "deploy_contracts:"+env, "coffee", "concat", "uglify", "copy"]