Skip to content

web3data/vue-truffle-web3data-starter

Repository files navigation

Welcome to the Web3data-Vue-Truffle-Starter pack!

Here you will find everything you need to get started with a Vue dApp! Comes preconfigured with Webpack, Truffle, Vue.js, vue-router, Vuex and sass-loader.

Welcome to web3 vue starter repo

Installation

Clone repo:

git clone https://github.com/web3data/vue-truffle-web3data-starter.git

Install Truffle (if you haven't already):

npm install -g truffle

Usage

Start your local ganache blockchain by running:

npm run cli

Then, in another shell or tab, compile and migrate the contracts:

truffle compile
truffle migrate

Finally, run the Webpack server in dev mode for front-end hot reloading:

npm start

Tests

npm 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

Directory structure

/
|
+-- build/
|   |
|   +-- contracts/
|   |   |
|   |   + truffle compiled contracts
|
+-- config/
|   |
|   +-- 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 build scripts
|
+-- src/
|   |
|   + vue.js dapp files
|
+-- static/
|   |
|   + vue.js dapp static files
|
+-- test/
|   |
|   + truffle test files