Giter VIP home page Giter VIP logo

truffle-vue's Introduction

Vue.js truffle box

A truffle box to serve as the foundation of any Truffle and Vue.js dApp. Comes with Vue.js, vue-router, Vuex and sass-loader. A minimalist user authentication smart contract is also provided.

Directory structure

This truffle box is crafted to enforce a clean directory structure.

/
|
+-- build/
|   |
|   +-- contracts/
|   |   |
|   |   + truffle compiled contracts
|
+-- config/
|   |
|   +-- babel/
|   |   |
|   |   + babel config files - to come (babel does not allow to specify a custom config file path - yet - so the babel configuration occurs in the package.json file for now)
|   |
|   +-- eslint/
|   |   |
|   |   + estlint config files
|   |
|   +-- postcss/
|   |   |
|   |   + postcss config files
|   |
|   +-- vue-loader
|   |   |
|   |   + vue-loader config files
|   |   
|   +-- webpack/
|   |   |
|   |   + webpack config files
|   
+-- contracts/
|   | 
|   + solidity contracts
|
+-- migrations/
|   |
|   + truffle migrations files
|
+-- scripts/
|   |
|   + webpack scripts
|
+-- src/
|   |
|   + vue.js dapp files
|
+-- static/
|   |
|   + vue.js dapp static files
|
+-- test/
|   |
|   +-- e2e/
|   |   |
|   |   + e2e test files
|   |
|   +-- truffle/
|   |   |
|   |   + truffle test files
|   |
|   +-- unit/
|   |   |
|   |   + unit test files

Installation

  1. Install Truffle and an Ethereum client - like EthereumJS TestRPC.

    npm install -g truffle // Version 3.0.5+ required.
    npm install -g ethereumjs-testrpc
    
  2. Download this box.

    truffle unbox wespr/truffle-vue
    
  3. Launch testrpc.

    testrpc <options>
    
  4. Compile and migrate the contracts.

    truffle compile
    truffle migrate
    
  5. Run the webpack server for front-end hot reloading. Smart contract changes do not support hot reloading for now.

    npm run start
    

Tests

This box comes with everything bundled for unit, e2e and truffle contracts testing.

  1. unit and e2e tests.

    npm run test/dapp
    
  2. truffle contracts tests.

    npm run test/truffle
    
  3. Alternatively you can directly run unit, e2e and truffle contracts tests in one command.

    npm run test
    

Build for production

To build the application for production, use the build command. A production build will be compiled in the dist folder.

npm run build

Issues

Please send any bug issues or proposal for improvement to Issues.

truffle-vue's People

Contributors

osarrouy avatar thelucasmoore avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.