Merge branch 'master' of github.com:iurimatias/embark-framework

This commit is contained in:
Iuri Matias 2015-06-04 07:26:57 -04:00
commit 570ee280cf
5 changed files with 60 additions and 49 deletions

View File

@ -1,5 +1,7 @@
What is embark
======
[![Join the chat at https://gitter.im/iurimatias/embark-framework](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iurimatias/embark-framework?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Embark is a framework that allows you to easily develop and deploy DApps. Embark automatically deploys your contracts and makes them available in your JS code. Embark watches for changes, and if you update a contract, Embark will automatically redeploy the contracts (if needed) and the dapp.
Installation

View File

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

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.5.0",
"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)