You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 14, 2020. It is now read-only.
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.)
28
27
29
28
In the directory `./packages/contracts/` run:
30
29
```
31
30
truffle compile
32
31
```
33
-
This will create the `.json` files for our solidity contracts.
32
+
This will create the `.json` files for our solidity contracts.
34
33
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:
36
37
```
37
-
npm link
38
+
truffle develop
38
39
```
39
40
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:
41
44
```
42
-
npm link @originprotocol/origin
45
+
migrate --reset
43
46
```
44
-
This will create a symlink, direcly linking the dapp to your local `origin.js` package.
45
47
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.)
47
49
48
-
In the directory `./packages/contracts/` run:
50
+
In the directory `./packages/origin.js` run:
49
51
```
50
-
truffle develop
52
+
npm link
51
53
```
52
54
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:
54
56
```
55
-
migrate --reset
57
+
npm link @originprotocol/origin
56
58
```
59
+
This will create a symlink, direcly linking the DApp to your local `origin.js` package.
57
60
61
+
## Import
58
62
59
-
60
-
## Import
61
63
```
62
64
import { contractService, ipfsService, originService } from '@originprotocol/origin'
63
65
```
@@ -108,4 +110,5 @@ Tests are automatically rerun when source or test code is changed.
108
110
Run a subset of tests using the `grep` query string parameter, for example: http://localhost:8081/?grep=IpfsService
0 commit comments