diff --git a/bin/old_embark b/bin/old_embark deleted file mode 100755 index a99cd29b..00000000 --- a/bin/old_embark +++ /dev/null @@ -1,193 +0,0 @@ -#!/usr/bin/env node - -var program = require('commander'); -var path = require('path'); -var wrench = require('wrench'); -var grunt = require('grunt'); -require('shelljs/global'); -var readYaml = require('read-yaml'); -var Embark = require('..'); - -var run = function(cmd) { - if (exec(cmd).code != 0) { - exit(); - } -} - -var deploy = function(env, embarkConfig, cb) { - var contractFiles = grunt.file.expand(embarkConfig.contracts); - var destFile = embarkConfig.output; - - Embark.init(); - Embark.blockchainConfig.loadConfigFile(embarkConfig.blockchainConfig); - Embark.contractsConfig.loadConfigFile(embarkConfig.contractsConfig); - - var chainFile = Embark.blockchainConfig.blockchainConfig[env].chains || embarkConfig.chains || './chains.json'; - - abi = Embark.deployContracts(env, contractFiles, destFile, chainFile, true, true, function(abi) { - grunt.file.write(destFile, abi); - cb(); - }); -} - -program - .version('1.2.0'); - -program.command('new [name]').description('New application').action(function(name) { - if (name === undefined) { - console.log("please specify the app name"); - exit; - } - var prefPath = path.join(__dirname + '/../boilerplate'); - - var targetDir = "./" + name; - wrench.copyDirSyncRecursive(prefPath, targetDir); - cd(targetDir); - run('npm install'); - console.log('\n\ninit complete'); -}); - -program.command('deploy [env]').description('deploy contracts').action(function(env_) { - var env = env_ || 'development'; - var embarkConfig = readYaml.sync("./embark.yml"); - - if (embarkConfig.type === "grunt") { - run("grunt deploy_contracts:" + env); - } - else { - deploy(env, embarkConfig, function() { exit(); }); - } -}); - -program.command('build [env]').description('build dapp').action(function(env_) { - var env = env_ || 'development'; - var embarkConfig = readYaml.sync("./embark.yml"); - - if (embarkConfig.type === "grunt") { - run("grunt clean"); - run("grunt deploy_contracts:" + env); - run('grunt build --env=' + env); - } - else if (embarkConfig.type === "meteor") { - deploy(env, embarkConfig); - run("meteor-build-client ./build -p ''"); - } -}); - -program.command('ipfs [env]').description('build dapp and make it available in ipfs').action(function(env_) { - var env = env_ || 'development'; - var embarkConfig = readYaml.sync("./embark.yml"); - - if (embarkConfig.type === "grunt") { - run("grunt clean") - run("grunt deploy_contracts:" + env) - run('grunt build --env=' + env) - run('grunt ipfs --env=' + env) - } - else if (embarkConfig.type === "meteor") { - deploy(env, embarkConfig); - run("meteor-build-client ./build -p ''"); - Embark.release.ipfs("build/") - } - else { - console.log("command not available in manual mode yet"); - } -}); - -program.command('run [env]').description('run dapp').action(function(env_) { - var env = env_ || 'development'; - var embarkConfig = readYaml.sync("./embark.yml"); - - if (embarkConfig.type === "grunt") { - run('grunt deploy --env=' + env); - } - else { - console.log("command not available in meteor or manual mode yet"); - console.log("try instead embark deploy; if using meteor then follow that with 'meteor'"); - } -}); - -program.command('spec').description('run tests').action(function() { - var embarkConfig = readYaml.sync("./embark.yml"); - - if (embarkConfig.type === "grunt") { - run('mocha test/ --no-timeouts'); - } - else { - console.log("command not available in meteor or manual mode yet"); - console.log("note: you can use embark tests with any framework"); - console.log("try running mocha test/"); - } -}); - -program.command('blockchain [env]').description('run blockchain').action(function(env_) { - var env = env_ || 'development'; - var embarkConfig = readYaml.sync("./embark.yml"); - - if (embarkConfig.type === "grunt") { - run('grunt blockchain:' + env); - } - else { - Embark.init() - Embark.blockchainConfig.loadConfigFile(embarkConfig.blockchainConfig) - Embark.contractsConfig.loadConfigFile(embarkConfig.contractsConfig) - - Embark.copyMinerJavascriptToTemp(); - - Embark.startBlockchain(env, true); - } -}); - -program.command('geth [args...]').description('run geth with specified arguments').action(function(env_, args_) { - var env = env_ || 'development'; - var embarkConfig = readYaml.sync("./embark.yml"); - var args = args_.join(' '); - - Embark.init() - Embark.blockchainConfig.loadConfigFile(embarkConfig.blockchainConfig) - Embark.contractsConfig.loadConfigFile(embarkConfig.contractsConfig) - - Embark.geth(env, args); -}); - -program.command('demo').description('create a working dapp with a SimpleStorage contract').action(function() { - var boilerPath = path.join(__dirname + '/../boilerplate'); - var demoPath = path.join(__dirname + '/../demo'); - - var targetDir = "./embark_demo"; - wrench.copyDirSyncRecursive(boilerPath, targetDir); - wrench.copyDirSyncRecursive(demoPath + "/app", targetDir + "/app", {forceDelete: true}); - wrench.copyDirSyncRecursive(demoPath + "/config", targetDir + "/config", {forceDelete: true}); - wrench.copyDirSyncRecursive(demoPath + "/test", targetDir + "/test", {forceDelete: true}); - - cd(targetDir); - run('npm install'); - console.log('\n\ninit complete'); -}); - -program.command('meteor_demo').description('create a working meteor dapp with a SimpleStorage contract').action(function() { - var boilerPath = path.join(__dirname + '/../demo_meteor'); - - var targetDir = "./embark_demo"; - wrench.copyDirSyncRecursive(boilerPath, targetDir); - console.log('\n\ninit complete'); -}); - -program.command('simulator').description('run a fast ethereum rpc simulator').action(function() { - try { - var EtherSim = require('ethersim'); - } catch(e) { - console.log('EtherSim not found; Please install it with "npm install ethersim --save"'); - console.log('For more information see https://github.com/iurimatias/ethersim'); - exit(); - } - EtherSim.startServer(); -}); - -program.parse(process.argv) - -if (!process.argv.slice(2).length) { - program.outputHelp(); -} - -//exit(); diff --git a/demo_meteor/.meteor/.finished-upgraders b/demo_meteor/.meteor/.finished-upgraders deleted file mode 100644 index 8a761038..00000000 --- a/demo_meteor/.meteor/.finished-upgraders +++ /dev/null @@ -1,8 +0,0 @@ -# This file contains information which helps Meteor properly upgrade your -# app when you run 'meteor update'. You should check it into version control -# with your project. - -notices-for-0.9.0 -notices-for-0.9.1 -0.9.4-platform-file -notices-for-facebook-graph-api-2 diff --git a/demo_meteor/.meteor/.gitignore b/demo_meteor/.meteor/.gitignore deleted file mode 100644 index 40830374..00000000 --- a/demo_meteor/.meteor/.gitignore +++ /dev/null @@ -1 +0,0 @@ -local diff --git a/demo_meteor/.meteor/.id b/demo_meteor/.meteor/.id deleted file mode 100644 index bc5e1676..00000000 --- a/demo_meteor/.meteor/.id +++ /dev/null @@ -1,7 +0,0 @@ -# This file contains a token that is unique to your project. -# Check it into your repository along with the rest of this directory. -# It can be used for purposes such as: -# - ensuring you don't accidentally deploy one app on top of another -# - providing package authors with aggregated statistics - -v2fbp61wvu7nd11xgkdz diff --git a/demo_meteor/.meteor/packages b/demo_meteor/.meteor/packages deleted file mode 100644 index 1e64d2fa..00000000 --- a/demo_meteor/.meteor/packages +++ /dev/null @@ -1,10 +0,0 @@ -# Meteor packages used by this project, one per line. -# Check this file (and the other files in this directory) into your repository. -# -# 'meteor add' and 'meteor remove' will edit this file for you, -# but you can also edit it by hand. - -meteor-platform -autopublish -insecure -ethereum:web3 diff --git a/demo_meteor/.meteor/platforms b/demo_meteor/.meteor/platforms deleted file mode 100644 index efeba1b5..00000000 --- a/demo_meteor/.meteor/platforms +++ /dev/null @@ -1,2 +0,0 @@ -server -browser diff --git a/demo_meteor/.meteor/release b/demo_meteor/.meteor/release deleted file mode 100644 index dab6b552..00000000 --- a/demo_meteor/.meteor/release +++ /dev/null @@ -1 +0,0 @@ -METEOR@1.1.0.2 diff --git a/demo_meteor/.meteor/versions b/demo_meteor/.meteor/versions deleted file mode 100644 index fbae8343..00000000 --- a/demo_meteor/.meteor/versions +++ /dev/null @@ -1,49 +0,0 @@ -autopublish@1.0.3 -autoupdate@1.2.1 -base64@1.0.3 -binary-heap@1.0.3 -blaze@2.1.2 -blaze-tools@1.0.3 -boilerplate-generator@1.0.3 -callback-hook@1.0.3 -check@1.0.5 -ddp@1.1.0 -deps@1.0.7 -ejson@1.0.6 -ethereum:web3@0.8.1 -fastclick@1.0.3 -geojson-utils@1.0.3 -html-tools@1.0.4 -htmljs@1.0.4 -http@1.1.0 -id-map@1.0.3 -insecure@1.0.3 -jquery@1.11.3_2 -json@1.0.3 -launch-screen@1.0.2 -livedata@1.0.13 -logging@1.0.7 -meteor@1.1.6 -meteor-platform@1.2.2 -minifiers@1.1.5 -minimongo@1.0.8 -mobile-status-bar@1.0.3 -mongo@1.1.0 -observe-sequence@1.0.6 -ordered-dict@1.0.3 -random@1.0.3 -reactive-dict@1.1.0 -reactive-var@1.0.5 -reload@1.1.3 -retry@1.0.3 -routepolicy@1.0.5 -session@1.1.0 -spacebars@1.0.6 -spacebars-compiler@1.0.6 -templating@1.1.1 -tracker@1.0.7 -ui@1.0.6 -underscore@1.0.3 -url@1.0.4 -webapp@1.2.0 -webapp-hashing@1.0.3 diff --git a/demo_meteor/chains.json b/demo_meteor/chains.json deleted file mode 100644 index 0967ef42..00000000 --- a/demo_meteor/chains.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/demo_meteor/client/embark.js b/demo_meteor/client/embark.js deleted file mode 100644 index 7de3dbf6..00000000 --- a/demo_meteor/client/embark.js +++ /dev/null @@ -1 +0,0 @@ -web3.setProvider(new web3.providers.HttpProvider('http://localhost:8101'));web3.eth.defaultAccount = web3.eth.accounts[0];SimpleStorageAbi = [{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"type":"function"},{"inputs":[{"name":"initialValue","type":"uint256"}],"type":"constructor"}];SimpleStorageContract = web3.eth.contract(SimpleStorageAbi);SimpleStorage = SimpleStorageContract.at('0x823802b31f5856bcf5a8a99f791934f9593afbf8'); \ No newline at end of file diff --git a/demo_meteor/client/myapp.css b/demo_meteor/client/myapp.css deleted file mode 100644 index b6b4052b..00000000 --- a/demo_meteor/client/myapp.css +++ /dev/null @@ -1 +0,0 @@ -/* CSS declarations go here */ diff --git a/demo_meteor/client/myapp.html b/demo_meteor/client/myapp.html deleted file mode 100644 index 8dc9b050..00000000 --- a/demo_meteor/client/myapp.html +++ /dev/null @@ -1,29 +0,0 @@ - - Embark - SimpleStorage Demo - - -

Embark - SimpleStorage Demo

- - {{> set_value}} - - {{> current_value}} - -
-
- - - - - - - diff --git a/demo_meteor/client/myapp.js b/demo_meteor/client/myapp.js deleted file mode 100644 index ee408d8a..00000000 --- a/demo_meteor/client/myapp.js +++ /dev/null @@ -1,35 +0,0 @@ -if (Meteor.isClient) { - Session.setDefault('value', 0); - - var addToLog = function(txt) { - $(".logs").append("
" + txt); - } - - Template.current_value.helpers({ - value: function () { - return Session.get('value'); - } - }); - - Template.current_value.events({ - 'click button': function () { - var value = SimpleStorage.get().toNumber(); - Session.set('value', value); - addToLog("SimpleStorage.get()"); - } - }); - - Template.set_value.events({ - 'click button': function () { - var value = parseInt($("input.text").val(), 10); - SimpleStorage.set(value); - addToLog("SimpleStorage.set("+value+")"); - } - }); -} - -if (Meteor.isServer) { - Meteor.startup(function () { - // code to run on server at startup - }); -} diff --git a/demo_meteor/config/blockchain.yml b/demo_meteor/config/blockchain.yml deleted file mode 100644 index 3bfb3fd2..00000000 --- a/demo_meteor/config/blockchain.yml +++ /dev/null @@ -1,24 +0,0 @@ -development: - rpc_host: localhost - rpc_port: 8101 - rpc_whitelist: "*" - minerthreads: 1 - genesis_block: config/genesis.json - datadir: /tmp/embark - mine_when_needed: true - gas_limit: 500000 - gas_price: 10000000000000 - 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/demo_meteor/config/contracts.yml b/demo_meteor/config/contracts.yml deleted file mode 100644 index 2b6d25d6..00000000 --- a/demo_meteor/config/contracts.yml +++ /dev/null @@ -1,8 +0,0 @@ -development: - SimpleStorage: - args: - - 100 -staging: - SimpleStorage: - args: - - 100 diff --git a/demo_meteor/config/genesis.json b/demo_meteor/config/genesis.json deleted file mode 100644 index 9f60d776..00000000 --- a/demo_meteor/config/genesis.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "nonce": "0x0000000000000042", - "difficulty": "0x40000", - "alloc": { - }, - "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "timestamp": "0x00", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "extraData": "0x", - "gasLimit": "0x4c4b40" -} diff --git a/demo_meteor/config/password b/demo_meteor/config/password deleted file mode 100644 index c747d679..00000000 --- a/demo_meteor/config/password +++ /dev/null @@ -1 +0,0 @@ -dev_password diff --git a/demo_meteor/contracts/simple_storage.sol b/demo_meteor/contracts/simple_storage.sol deleted file mode 100644 index 0b12e43d..00000000 --- a/demo_meteor/contracts/simple_storage.sol +++ /dev/null @@ -1,14 +0,0 @@ -contract SimpleStorage { - uint public storedData; - - function SimpleStorage(uint initialValue) { - storedData = initialValue; - } - - function set(uint x) { - storedData = x; - } - function get() constant returns (uint retVal) { - return storedData; - } -} diff --git a/demo_meteor/embark.yml b/demo_meteor/embark.yml deleted file mode 100644 index 329544dd..00000000 --- a/demo_meteor/embark.yml +++ /dev/null @@ -1,5 +0,0 @@ -type: "meteor" -contracts: ["contracts/**/*.sol", "contracts/**/*.se"] -output: "client/embark.js" -blockchainConfig: "config/blockchain.yml" -contractsConfig: "config/contracts.yml" diff --git a/grunt-embark/Gruntfile.coffee b/grunt-embark/Gruntfile.coffee deleted file mode 100644 index 806ee90f..00000000 --- a/grunt-embark/Gruntfile.coffee +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = (grunt) -> - - grunt.initConfig - "grunt-embark": {} - - grunt.loadTasks "tasks" - diff --git a/grunt-embark/LICENSE b/grunt-embark/LICENSE deleted file mode 100644 index 2c82caa0..00000000 --- a/grunt-embark/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 embark-framework - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/grunt-embark/README.md b/grunt-embark/README.md deleted file mode 100644 index 5641f8ee..00000000 --- a/grunt-embark/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# grunt-embark -grunt plugin for [Embark](https://github.com/iurimatias/embark-framework) - DApp Framework for Ethereum - -## Getting Started -From the same directory as your project's Gruntfile and package.json, install -this plugin with the following command: - -```bash -$ npm install embark-framework --save-dev -$ npm install grunt-embark --save-dev -``` - -Once that's done, add this line to your project's Gruntfile: - -```js -grunt.loadNpmTasks('grunt-embark'); -``` - -## Config -Inside your `Gruntfile.js` file, add a section named `deploy`, containing -the fields `contracts` and `dest`. - -### Here's an example that deploys contracts and generates the js client file - -```js -deploy: { - contracts: ["app/contracts/**/*.sol"], - dest: "embark_client.js" -} -``` diff --git a/grunt-embark/tasks/blockchain.coffee b/grunt-embark/tasks/blockchain.coffee deleted file mode 100644 index 4cc574cc..00000000 --- a/grunt-embark/tasks/blockchain.coffee +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = (grunt) -> - - grunt.registerTask "blockchain", "deploy ethereum node", (env_) => - env = env_ || "development" - Embark = require('embark-framework') - Embark.init() - Embark.blockchainConfig.loadConfigFile('config/blockchain.yml') - Embark.startBlockchain(env) - diff --git a/grunt-embark/tasks/deploy.coffee b/grunt-embark/tasks/deploy.coffee deleted file mode 100644 index 7335c971..00000000 --- a/grunt-embark/tasks/deploy.coffee +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = (grunt) -> - - grunt.registerTask "deploy_contracts", "deploy code", (env_) -> - env = env_ || "development" - contractFiles = grunt.file.expand(grunt.config.get("deploy.contracts")); - destFile = grunt.config.get("deploy.dest"); - - Embark = require('embark-framework') - Embark.init() - Embark.blockchainConfig.loadConfigFile('config/blockchain.yml') - Embark.contractsConfig.loadConfigFile('config/contracts.yml') - - chainFile = Embark.blockchainConfig.blockchainConfig[env].chains || './chains.json' - - deployed = false - - done = @async() - Embark.deployContracts env, contractFiles, destFile, chainFile, true, true, (abi) => - grunt.file.write(destFile, abi) - - unless deployed - deployed = true - done() - diff --git a/grunt-embark/tasks/ipfs.coffee b/grunt-embark/tasks/ipfs.coffee deleted file mode 100644 index f2b4dc2d..00000000 --- a/grunt-embark/tasks/ipfs.coffee +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = (grunt) -> - - grunt.registerTask "ipfs", "distribute into ipfs", (env_) => - env = env_ || "development" - Embark = require('embark-framework') - Embark.release.ipfs("dist/dapp/") - diff --git a/package.json b/package.json index 97a55ede..faf8c72b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "embark-framework", + "name": "embark", "version": "1.2.0", - "description": "", + "description": "Embark is a framework that allows you to easily develop and deploy DApps", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" },