From d5367913ab1b5651ad0870df4afcc31853da91b9 Mon Sep 17 00:00:00 2001 From: "g. nicholas d'andrea" Date: Mon, 26 Jun 2017 13:53:41 -0400 Subject: [PATCH 1/2] Add initial box config --- truffle-box.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 truffle-box.json diff --git a/truffle-box.json b/truffle-box.json new file mode 100644 index 0000000..c72ca7f --- /dev/null +++ b/truffle-box.json @@ -0,0 +1,17 @@ +{ + "ignore": [ + "README.md", + ".gitignore" + ], + "commands": { + "Compile": "truffle compile", + "Migrate": "truffle migrate", + "Test contracts": "truffle test", + "Test dapp": "npm test", + "Run dev server": "npm run start", + "Build for production": "npm run build" + }, + "hooks": { + "post-unpack": "npm install" + } +} From 2d26688f0427bff27c1b9a90064d8f769e6289d4 Mon Sep 17 00:00:00 2001 From: "g. nicholas d'andrea" Date: Mon, 26 Jun 2017 14:10:37 -0400 Subject: [PATCH 2/2] Fix README to use `truffle unbox` command --- README.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ef38f16..4117512 100644 --- a/README.md +++ b/README.md @@ -10,28 +10,23 @@ This box comes with everything you need to start using smart contracts from a re npm install -g ethereumjs-testrpc ``` -2. Clone or download the truffle box of your choice. +2. Downlaod box using Truffle. ```javascript - git clone [repo] + truffle unbox truffle-box-react ``` -3. Install the node dependencies. - ```javascript - npm install - ``` - -4. Compile and migrate the contracts. +3. Compile and migrate the contracts. ```javascript truffle compile truffle migrate ``` -5. Run the webpack server for front-end hot reloading. For now, smart contract changes must be manually recompiled and migrated. +4. Run the webpack server for front-end hot reloading. For now, smart contract changes must be manually recompiled and migrated. ```javascript npm run start ``` -6. Jest is included for testing React components and Truffle's own suite is incldued for smart contracts. Be sure you've compile your contracts before running jest, or you'll receive some file not found errors. +5. Jest is included for testing React components and Truffle's own suite is incldued for smart contracts. Be sure you've compile your contracts before running jest, or you'll receive some file not found errors. ```javascript // Runs Jest for component tests. npm run test @@ -40,7 +35,7 @@ This box comes with everything you need to start using smart contracts from a re truffle test ``` -7. To build the application for production, use the build command. A production build will be in the build_webpack folder. +6. To build the application for production, use the build command. A production build will be in the build_webpack folder. ```javascript npm run build ```