add instruction for runing example with source code
MODIFY
examples/README.md
examples/README.md
@@ -38,3 +38,31 @@ let's run a plasma erc20 balance example
```
node plasma/erc20/balance.js
```
+
+## Run example using source code
+
+This section helps you to run the example code with current source code. Generally it is needed for debugging purpose.
+
+### 1. Build & link source code
+
+Run the below command inside root of this project.
+
+```
+npm run build:link
+```
+
+You might get permission issue, in this case run the command using `sudo`.
+
+### 2. Link the library
+
+#### 2.1 Move into examples folder
+
+```
+cd examples
+```
+
+#### 2.2 run link command
+
+```
+npm run link:lib
+```

MODIFY
examples/package.json
examples/package.json
"description": "## How to use",
"main": "config.js",
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "link:lib":"npm link @maticnetwork/maticjs"
},
"author": "",
"license": "ISC",

MODIFY
package.json
package.json
],
"scripts": {
"clean": "rimraf lib dist",
+ "build": "npm run build:dev",
+ "build:link": "npm run build && npm link",
"build:webpack": "npm run lint && webpack",
"build:pack": "npm run build:dev && npm pack",
"build:dev": "cross-env NODE_ENV=development npm run build:webpack",
"build:prod": "cross-env NODE_ENV=production npm run build:webpack",
"deploy": "npm run build:dev && npm run build:prod",
- "build": "npm run build:dev",
"prepublishOnly": "npm run deploy",
"lint": "eslint --ext .ts src",
"lint:fix": "eslint --ext .ts src --fix",

add instruction for runing example with source code