From 04083e5fab37a45deb223dd04a9b3298ea67f8c9 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 24 May 2015 08:58:17 -0400 Subject: [PATCH] add boilerplate app --- boilerplate/Gruntfile.coffee | 54 ++++++++++++++++++++++++++++++ boilerplate/app/contracts/.gitkeep | 0 boilerplate/app/css/.gitkeep | 0 boilerplate/app/html/index.html | 9 +++++ boilerplate/app/js/.gitkeep | 0 boilerplate/config/blockchain.yml | 21 ++++++++++++ boilerplate/config/password | 1 + boilerplate/config/server.yml | 2 ++ boilerplate/package.json | 31 +++++++++++++++++ 9 files changed, 118 insertions(+) create mode 100644 boilerplate/Gruntfile.coffee create mode 100644 boilerplate/app/contracts/.gitkeep create mode 100644 boilerplate/app/css/.gitkeep create mode 100644 boilerplate/app/html/index.html create mode 100644 boilerplate/app/js/.gitkeep create mode 100644 boilerplate/config/blockchain.yml create mode 100644 boilerplate/config/password create mode 100644 boilerplate/config/server.yml create mode 100644 boilerplate/package.json diff --git a/boilerplate/Gruntfile.coffee b/boilerplate/Gruntfile.coffee new file mode 100644 index 000000000..6000e1fc4 --- /dev/null +++ b/boilerplate/Gruntfile.coffee @@ -0,0 +1,54 @@ +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" + + # 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) + diff --git a/boilerplate/app/contracts/.gitkeep b/boilerplate/app/contracts/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/boilerplate/app/css/.gitkeep b/boilerplate/app/css/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/boilerplate/app/html/index.html b/boilerplate/app/html/index.html new file mode 100644 index 000000000..ad651921f --- /dev/null +++ b/boilerplate/app/html/index.html @@ -0,0 +1,9 @@ + + + Embark + + + + + + diff --git a/boilerplate/app/js/.gitkeep b/boilerplate/app/js/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/boilerplate/config/blockchain.yml b/boilerplate/config/blockchain.yml new file mode 100644 index 000000000..4aa39e7b6 --- /dev/null +++ b/boilerplate/config/blockchain.yml @@ -0,0 +1,21 @@ +development: + rpc_host: localhost + rpc_port: 8101 + rpc_whitelist: "*" + minerthreads: 1 + datadir: /tmp/embark + mine_when_needed: true + console: false + account: + init: true + password: config/password +staging: + rpc_host: localhost + rpc_port: 8101 + rpc_whitelist: "*" + datadir: default + network_id: 0 + console: true + account: + init: false + address: diff --git a/boilerplate/config/password b/boilerplate/config/password new file mode 100644 index 000000000..c747d679e --- /dev/null +++ b/boilerplate/config/password @@ -0,0 +1 @@ +dev_password diff --git a/boilerplate/config/server.yml b/boilerplate/config/server.yml new file mode 100644 index 000000000..2b9fa0014 --- /dev/null +++ b/boilerplate/config/server.yml @@ -0,0 +1,2 @@ +host: localhost +port: 8000 diff --git a/boilerplate/package.json b/boilerplate/package.json new file mode 100644 index 000000000..753e73212 --- /dev/null +++ b/boilerplate/package.json @@ -0,0 +1,31 @@ +{ + "name": "app_name", + "version": "0.0.1", + "description": "", + "main": "Gruntfile.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "homepage": "", + "devDependencies": { + "embark-framework": "^0.0.1", + "commander": "^2.8.1", + "compression": "^1.4.3", + "execSync": "^1.0.2", + "express": "^4.12.3", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-coffee": "^0.13.0", + "grunt-contrib-concat": "^0.5.1", + "grunt-contrib-copy": "^0.8.0", + "grunt-contrib-uglify": "^0.9.1", + "grunt-contrib-watch": "^0.6.1", + "matchdep": "^0.3.0", + "read-yaml": "^1.0.0", + "shelljs": "^0.4.0", + "string": "^3.1.1", + "web3": "^0.3.4", + "wrench": "^1.5.8" + } +}