TAGS

webpack-box

CREATED

UPDATED

STARS

INSTALL

...

REPOSITORY
GitHub Download
Please wait: Fetching readme...

b"# Webpack Truffle Box\n\nThis box is our most bare official implementation with Webpack.\n\nIncludes contracts, migrations, tests, user interface, and webpack build pipeline.\n\n## Installation\n\nFirst ensure you are in a new and empty directory.\n\n1. Run the `unbox` command via `npx` and skip to step 3.\n ```js\n npx truffle unbox webpack\n ```\n\n2. Alternatively, you can install Truffle globally and run the `unbox` command.\n ```javascript\n npm install -g truffle\n truffle unbox webpack\n ```\n\n3. Run the development console.\n ```javascript\n truffle develop\n ```\n\n4. Compile and migrate the smart contracts. Note inside the development console we don't preface commands with `truffle`.\n ```javascript\n compile\n migrate\n ```\n\n5. In the `app` directory, we build and run our frontend. Smart contract changes must be manually recompiled and migrated.\n ```javascript\n // in another terminal (i.e. not in the truffle develop prompt)\n cd app\n npm run dev\n ```\n\n6. Truffle can run tests written in Solidity or JavaScript against your smart contracts. Note the command varies slightly if you're in or outside of the development console.\n ```javascript\n // inside the development console.\n test\n\n // outside the development console..\n truffle test\n ```\n\n7. To build the application for production, use the build script in the `app` folder. A production build will be in the `app/dist` folder.\n ```javascript\n // ensure you are inside the client directory when running this\n npm run build\n ```\n\n## FAQ\n\n* __Where is my production build?__\n\n The production build will be in the `app/dist` folder after running `npm run build` in the `app` folder.\n\n* __Where can I find more documentation?__\n\n This box is a marriage of [Truffle](http://truffleframework.com/) and a [Webpack](https://webpack.js.org/) setup. Either one would be a great place to start!"