Browse Source

Run `yarn run report` without building first

Joystream Stats 3 years ago
parent
commit
373453c848

+ 9 - 4
contributions/tech/report-generator/README.md

@@ -6,7 +6,7 @@ It takes some minutes to complete the report, multiple runs, with the same block
 
 ## Setup
 
-`yarn && yarn build`
+`yarn`
 
 To update the submodule in `src/lib`:
 ```
@@ -16,11 +16,16 @@ git submodule update
 
 ## Usage
 
-`node build/generator.js <start block> <end block>`
+`yarn run report`
 
-## Example
+OR
 
-`node build/generator.js 57601 234038`
+`yarn build && node build/generator.js <start block> <end block>`
+
+## Examples
+
+- `yarn run report 30`
+- `node build/generator.js 57601 234038`
 
 # Contributors
 

+ 3 - 1
contributions/tech/report-generator/package.json

@@ -4,6 +4,7 @@
   "main": "build/index.js",
   "license": "MIT",
   "scripts": {
+    "report": "ts-node src/generator.ts",
     "build": "tsc --build tsconfig.json",
     "status": "node lib/status"
   },
@@ -19,7 +20,8 @@
     "@polkadot/wasm-crypto": "^4.0.2",
     "@types/bn.js": "^4.11.6",
     "bn.js": "^5.1.2",
-    "csv-parse": "^4.15.4"
+    "csv-parse": "^4.15.4",
+    "ts-node": "^10.3.0"
   },
   "devDependencies": {
     "@polkadot/ts": "^0.3.62",