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:
commit
84b77abce1
|
@ -1,53 +1,56 @@
|
|||
module.exports = (grunt) ->
|
||||
|
||||
grunt.config.merge
|
||||
files:
|
||||
js:
|
||||
src: [
|
||||
"app/js/**/*.js"
|
||||
]
|
||||
|
||||
css:
|
||||
src: [
|
||||
"app/css/**/*.css"
|
||||
]
|
||||
|
||||
html:
|
||||
src: [
|
||||
"app/html/**/*.html"
|
||||
]
|
||||
|
||||
contracts:
|
||||
src: [
|
||||
"app/contracts/**/*.sol"
|
||||
]
|
||||
|
||||
concat:
|
||||
app:
|
||||
src: ["<%= files.web3 %>", 'generated/tmp/abi.js', "<%= files.js.src %>", "<%= files.coffee.compiled %>"]
|
||||
dest: "generated/dapp/js/app.min.js"
|
||||
css:
|
||||
src: "<%= files.css.src %>"
|
||||
dest: "generated/dapp/css/app.min.css"
|
||||
|
||||
copy:
|
||||
html:
|
||||
files:
|
||||
"generated/dapp/index.html" : "<%= files.html.src %>"
|
||||
"dist/dapp/index.html" : "<%= files.html.src %>"
|
||||
css:
|
||||
files:
|
||||
"dist/dapp/css/app.min.css" : "<%= files.css.src %>"
|
||||
contracts:
|
||||
files:
|
||||
"dist/contracts/": '<%= files.contracts.src %>'
|
||||
|
||||
deploy:
|
||||
contracts: '<%= files.contracts.src %>'
|
||||
dest: 'generated/tmp/abi.js'
|
||||
|
||||
grunt.loadNpmTasks "embark-framework"
|
||||
|
||||
grunt.initConfig(
|
||||
@initEmbarkConfig(
|
||||
files:
|
||||
js:
|
||||
src: [
|
||||
"app/js/**/*.js"
|
||||
]
|
||||
|
||||
css:
|
||||
src: [
|
||||
"app/css/**/*.css"
|
||||
]
|
||||
|
||||
html:
|
||||
src: [
|
||||
"app/html/**/*.html"
|
||||
]
|
||||
|
||||
contracts:
|
||||
src: [
|
||||
"app/contracts/**/*.sol"
|
||||
]
|
||||
|
||||
concat:
|
||||
app:
|
||||
src: ["<%= files.web3 %>", 'generated/tmp/abi.js', "<%= files.js.src %>", "<%= files.coffee.compiled %>"]
|
||||
dest: "generated/dapp/js/app.min.js"
|
||||
css:
|
||||
src: "<%= files.css.src %>"
|
||||
dest: "generated/dapp/css/app.min.css"
|
||||
|
||||
copy:
|
||||
html:
|
||||
files:
|
||||
"generated/dapp/index.html" : "<%= files.html.src %>"
|
||||
"dist/dapp/index.html" : "<%= files.html.src %>"
|
||||
css:
|
||||
files:
|
||||
"dist/dapp/css/app.min.css" : "<%= files.css.src %>"
|
||||
contracts:
|
||||
files:
|
||||
"dist/contracts/": '<%= files.contracts.src %>'
|
||||
|
||||
deploy:
|
||||
contracts: '<%= files.contracts.src %>'
|
||||
dest: 'generated/tmp/abi.js'
|
||||
)
|
||||
)
|
||||
|
||||
# loading external tasks (aka: plugins)
|
||||
# Loads all plugins that match "grunt-", in this case all of our current plugins
|
||||
require('matchdep').filterAll('grunt-*').forEach(grunt.loadNpmTasks)
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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": [],
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue