-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
107 lines (97 loc) · 6.77 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"name": "jolly-roger",
"version": "0.0.1",
"description": "Jolly Roger",
"license": "UNLICENSED",
"private": true,
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.9.1",
"cross-env": "^7.0.2",
"dotenv-cli": "^3.1.0",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-svelte3": "^2.7.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.2",
"prettier-plugin-solidity": "^1.0.0-alpha.59",
"prettier-plugin-svelte": "^1.4.1",
"rimraf": "^3.0.2",
"solhint": "^3.3.1",
"solhint-plugin-prettier": "^0.0.5",
"svelte": "^3.25.1",
"typescript": "3.9.7",
"wait-on": "^5.1.0",
"wighawag_newsh": "0.0.6"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"prepare": "node ./.setup.js",
"lint": "eslint \"**/*.{js,ts}\" && solhint contracts/src/**/*.sol",
"lint:fix": "eslint --fix \"**/*.{js,ts}\" && solhint --fix contracts/src/**/*.sol",
"format": "npm run --prefix _npm prettier -- --write \"../**/*.{ts,js,svelte,sol}\"",
"test": "run-s contracts:test",
"// externals : Setup external services locally (ethereum node, thegraph)": "",
"stop": "run-s externals:down",
"externals:down": "docker-compose down -v",
"docker-compose": "dotenv -e .env -e contracts/.env -- docker-compose up",
"externals": "run-p docker-compose contracts:fundingFromGethCoinbase",
"shell:externals": "newsh \"npm run externals\"",
"// common lib: ensure it is compiled": "",
"common:dev": "npm --prefix common-lib run dev",
"shell:common": "newsh \"npm run common:dev\"",
"common:build": "npm --prefix common-lib run build",
"// contracts : deploy smart contracts on local ethereum node": "",
"contracts:test": "npm --prefix contracts test",
"contracts:clean": "rimraf contracts/deployments/localhost && rimraf web/src/contracts.json",
"contracts": "dotenv -e .env -e contracts/.env -- npm --prefix contracts run local:dev -- --export ../web/src/contracts.json",
"shell:contracts": "newsh \"npm run contracts\"",
"contracts:deploy": "dotenv -e .env -e contracts/.env -- npm --prefix contracts run local:deploy -- --export ../web/src/contracts.json",
"contracts:export": "dotenv -e .env -e contracts/.env -- npm --prefix contracts run local:export -- --export ../web/src/contracts.json",
"contracts:fundingFromGethCoinbase": "dotenv -e .env -e contracts/.env -- npm --prefix contracts run local:run scripts/fundingFromGethCoinbase.ts",
"seed": "wait-on web/src/contracts.json && dotenv -e .env -e contracts/.env -- npm --prefix contracts run local:seed",
"seed:build": "run-s common:build seed",
"// subgraphs : generate and deploy local subgraph": "",
"subgraph": "wait-on web/src/contracts.json && dotenv -- npm --prefix subgraph run dev ../contracts/deployments/localhost",
"shell:subgraph": "newsh \"npm run subgraph\"",
"subgraph:setup": "dotenv -- npm --prefix subgraph run local:setup",
"subgraph:deploy": "wait-on web/src/contracts.json && dotenv -- npm --prefix subgraph run local:deploy ../contracts/deployments/localhost",
"// web : build and serve the web app": "",
"web": "dotenv -- npm --prefix web run dev",
"shell:web": "newsh \"npm run web\"",
"web:build": "run-s web:generate contracts:export web:rebuild",
"web:rebuild": "dotenv -- npm --prefix web run build",
"web:serve": "dotenv -- npm --prefix web run serve --",
"web:build:serve": "run-s web:build web:serve",
"web:generate": "dotenv -- npm --prefix web run generate",
"// STAGING : deploy on staging": "",
"staging:web:dev": "dotenv -e .env.staging -e .env -- npm --prefix web run dev",
"staging:web:build": "run-s web:generate staging:contracts:export common:build staging:web:rebuild",
"staging:web:build:serve": "run-s staging:web:build web:serve",
"staging:web:rebuild": "dotenv -e .env.staging -e .env -- npm --prefix web run build",
"staging:web:deploy": "dotenv -e .env.staging -e .env -- npm --prefix web run deploy",
"staging:seed": "dotenv -e .env.staging -e .env -- npm --prefix contracts run staging:seed",
"staging:contracts:export": "dotenv -e .env.staging -e .env -- npm --prefix contracts run staging:export -- --export ../web/src/contracts.json",
"staging:contracts": "dotenv -e .env.staging -e .env -- npm --prefix contracts run staging:deploy -- --export ../web/src/contracts.json",
"staging:subgraph": "dotenv -e .env.staging -e .env -- npm --prefix subgraph run staging:deploy ../contracts/deployments/staging",
"staging:web": "run-s staging:web:build staging:web:deploy",
"staging": "run-s staging:contracts staging:subgraph web:generate common:build staging:web:rebuild staging:web:deploy",
"staging:reset": "rimraf contracts/deployments/staging && run-s staging:contracts staging:subgraph web:generate common:build staging:web:rebuild staging:web:deploy",
"// PRODUCTION : build on mainnet": "",
"production:web:build": "run-s web:generate production:contracts:export common:build production:web:rebuild",
"production:web:build:serve": "run-s production:web:build web:serve",
"production:web:rebuild": "dotenv -e .env.production -e .env -- npm --prefix web run build",
"production:web:deploy": "dotenv -e .env.production -e .env -- npm --prefix web run deploy",
"production:contracts:export": "dotenv -e .env.production -e .env -- npm --prefix contracts run mainnet:export -- --export ../web/src/contracts.json",
"production:contracts": "dotenv -e .env.production -e .env -- npm --prefix contracts run mainnet:deploy -- --export ../web/src/contracts.json",
"production:subgraph": "dotenv -e .env.production -e .env -- npm --prefix subgraph run mainnet:deploy ../contracts/deployments/mainnet",
"production:web": "run-s production:web:build production:web:deploy",
"production": "run-s production:contracts production:subgraph web:generate common:build production:web:rebuild production:web:deploy",
"// START : local development setup": "This setup external service, setup subgraph and deploy it on the local graph-node, deploy the contracts and seed it",
"setup": "npm-run-all -l externals:down --parallel externals",
"start": "npm-run-all -l externals:down contracts:clean --parallel common:dev web externals subgraph:setup contracts subgraph seed:build",
"dev": "npm-run-all -l contracts:clean --parallel common:dev web subgraph:setup contracts subgraph seed:build",
"shell:start": "npm-run-all -l externals:down --parallel shell:common shell:web shell:externals --sequential common:build subgraph:setup contracts:clean shell:contracts shell:subgraph seed",
"shell:dev": "npm-run-all -l --parallel shell:common shell:web --sequential common:build subgraph:setup contracts:clean shell:contracts shell:subgraph seed"
}
}