Skip to content
This repository was archived by the owner on Jan 14, 2020. It is now read-only.

Commit da8e595

Browse files
authored
Merge pull request #81 from micahalcorn/master
Correct local installation sequence
2 parents 4126313 + 40583ce commit da8e595

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

packages/origin.js/README.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
## Introduction
44

55
Welcome to the origin.js documentation! origin.js is a Javascript library for interacting with the Origin protocol.
6-
Using the library you can create new listings from your applications, purchase them, or update them from your own off-chain applications.
6+
Using the library you can create new listings from your applications, purchase them, or update them from your own off-chain applications.
77

8-
More information can be found at [Origin Platform Readme](/README.md)
8+
More information can be found at [Origin Platform Readme](/README.md).
99

1010
### Warning
11-
This is still an alpha version which will evolve significantly before the main net release.
11+
This is still an alpha version which will evolve significantly before the main net release.
1212

1313

14-
## Install
14+
## Install
1515

1616
### NPM
1717
```
@@ -24,40 +24,42 @@ yarn add @originprotocol/origin
2424
```
2525

2626
### Local
27-
For developing on `origin.js`, it is better to link the package rather than installing it. (Otherwise you would need to run `npm build` everytime you made a change to the package.)
2827

2928
In the directory `./packages/contracts/` run:
3029
```
3130
truffle compile
3231
```
33-
This will create the `.json` files for our solidity contracts.
32+
This will create the `.json` files for our solidity contracts.
3433

35-
In the directory `./packages/origin.js` run:
34+
Next, you will need to start your local development blockchain.
35+
36+
In the same directory run:
3637
```
37-
npm link
38+
truffle develop
3839
```
3940

40-
Now change tabs (or diectories) to the repo for your DApp (for example, the [Origin demo-dapp](https://github.com/OriginProtocol/demo-dapp)) run:
41+
Then, you will need to deploy your contracts.
42+
43+
In the same directory run:
4144
```
42-
npm link @originprotocol/origin
45+
migrate --reset
4346
```
44-
This will create a symlink, direcly linking the dapp to your local `origin.js` package.
4547

46-
Next, you will need to start your local development blockchain.
48+
Finally, you will need to build the node module. For developing on `origin.js`, it is better to link the package rather than installing it. (Otherwise you would need to run `npm build` everytime you made a change to the package.)
4749

48-
In the directory `./packages/contracts/` run:
50+
In the directory `./packages/origin.js` run:
4951
```
50-
truffle develop
52+
npm link
5153
```
5254

53-
Then in the console run:
55+
Now change tabs (or directories) to the repo for your DApp (for example, the [Origin demo-dapp](https://github.com/OriginProtocol/demo-dapp)) and run:
5456
```
55-
migrate --reset
57+
npm link @originprotocol/origin
5658
```
59+
This will create a symlink, direcly linking the DApp to your local `origin.js` package.
5760

61+
## Import
5862

59-
60-
## Import
6163
```
6264
import { contractService, ipfsService, originService } from '@originprotocol/origin'
6365
```
@@ -108,4 +110,5 @@ Tests are automatically rerun when source or test code is changed.
108110
Run a subset of tests using the `grep` query string parameter, for example: http://localhost:8081/?grep=IpfsService
109111

110112
## Documentation
113+
111114
Needed

0 commit comments

Comments
 (0)