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
.
Clone repo:
git clone https://github.com/web3data/vue-truffle-web3data-starter.git
Install Truffle (if you haven't already):
npm install -g truffle
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
npm test
To build the application for production, use the build command. A production build will be compiled in the dist
folder.
npm run build
/
|
+-- 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