Merge pull request #8 from iurimatias/improve_config_file

improve config hash to fix issues requiring files in a specific order
This commit is contained in:
Iuri Matias 2015-06-04 07:20:57 -04:00
commit 84b77abce1
4 changed files with 58 additions and 49 deletions

View File

@ -1,6 +1,9 @@
module.exports = (grunt) ->
grunt.config.merge
grunt.loadNpmTasks "embark-framework"
grunt.initConfig(
@initEmbarkConfig(
files:
js:
src: [
@ -45,8 +48,8 @@ module.exports = (grunt) ->
deploy:
contracts: '<%= files.contracts.src %>'
dest: 'generated/tmp/abi.js'
grunt.loadNpmTasks "embark-framework"
)
)
# loading external tasks (aka: plugins)
# Loads all plugins that match "grunt-", in this case all of our current plugins

View File

@ -27,6 +27,7 @@
"shelljs": "^0.4.0",
"string": "^3.1.1",
"web3": "^0.4.3",
"wrench": "^1.5.8"
"wrench": "^1.5.8",
"hashmerge": "^1.0.2"
}
}

View File

@ -25,7 +25,8 @@
"read-yaml": "^1.0.0",
"shelljs": "^0.5.0",
"web3": "^0.4.3",
"wrench": "^1.5.8"
"wrench": "^1.5.8",
"hashmerge": "^1.0.2"
},
"author": "Iuri Matias <iuri.matias@gmail.com>",
"contributors": [],

View File

@ -1,6 +1,6 @@
module.exports = (grunt) ->
grunt.initConfig
@embarkConfig =
files:
web3:
"node_modules/embark-framework/js/web3.js"
@ -96,3 +96,7 @@ module.exports = (grunt) ->
contracts: '<%= files.contracts.src %>'
dest: 'generated/tmp/abi.js'
@initEmbarkConfig = (userConfig) =>
hashmerge = require('hashmerge')
hashmerge(@embarkConfig, userConfig)