Merge pull request #119 from SafeMarket/gruntfile_env_fix

env fix
This commit is contained in:
Iuri Matias 2015-11-23 08:25:37 -05:00
commit 9a33a392a5
2 changed files with 8 additions and 6 deletions

View File

@ -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");

View File

@ -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"]