A dApp based on truffle-vue truffle box. Comes with Vue.js
, vue-router
, Vuex
and sass-loader
.
/
|
+-- 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
-
Install Truffle and an Ethereum client - like EthereumJS TestRPC.
npm install -g truffle // Version 3.0.5+ required. npm install -g ethereumjs-testrpc
-
Install Dependencies
npm install
-
Launch
testrpc
.testrpc
-
Compile and migrate the contracts.
truffle compile truffle migrate
-
Run the webpack server for front-end hot reloading. Smart contract changes do not support hot reloading for now.
npm run start
This box comes with everything bundled for unit
, e2e
and truffle
contracts testing.
-
unit
ande2e
tests.npm run test/dapp
-
truffle
contracts tests.npm run test/truffle
-
Alternatively you can directly run
unit
,e2e
andtruffle
contracts tests in one command.npm run test
To build the application for production, use the build command. A production build will be compiled in the dist
folder.
npm run build