Skip to content

Commit

Permalink
Merge pull request brave-intl#3 from gnidan/box-config
Browse files Browse the repository at this point in the history
Add initial box config
  • Loading branch information
OnlyOneJMJQ authored Jun 27, 2017
2 parents 1e829fc + 2d26688 commit 9ddf8e6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
Expand Down
17 changes: 17 additions & 0 deletions truffle-box.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit 9ddf8e6

Please sign in to comment.