Skip to content

Commit

Permalink
seperate build from dist webapp
Browse files Browse the repository at this point in the history
  • Loading branch information
ddd-mtl committed Mar 28, 2023
1 parent 7c4601d commit 462ebea
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ jobs:
- name: build webapp
shell: bash
run: |
npm run dist:webapp
npm run build:webapp
# Dist webapp
- name: Dist webapp
run: |
npm run dist -w webapp
# build electron
- name: build electron
shell: bash
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-webhapps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:
# Build webapp
- name: Build webapp
run: |
npm run dist:webapp
npm run build:webapp
# Dist webapp
- name: Dist webapp
run: |
npm run dist -w webapp
# Package web-happ
- name: Package web-happ
run: |
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
"hash-zome" : "bash submodules/hc-prebuilt/hash-zome.sh $npm_package_config_bin ./submodules/snapmail-rsm/target/wasm32-unknown-unknown/release/snapmail_model.wasm artifacts/snapmail_zome_hash.txt && cp artifacts/snapmail_zome_hash.txt electron/bin",

"build:happ" : "bash scripts/npm/dist-dna.sh $npm_package_config_bin && npm run hash-zome",
"build:webapp" : "npm run clean:agents & bash scripts/ts-bindings.sh && npm run build:webapp",
"dist:webapp" : "npm run build -w webcomponents && npm run dist -w webapp",

"build:webapp" : "npm run build -w webcomponents && npm run build -w webapp",

"devtest" : "npm run build:happ && npm run build:webapp && npm run start",
"devtest:we" : "npm run build:happ && npm run dist:webapp && BUILD_MODE='dev' npm run devtest -w we-applet",
"devtest:electron" : "npm run build:happ && npm run dist:webapp && npm run devtest -w electron",
"prepare-devtest" : "npm run clean:agents && npm run build:happ && bash scripts/ts-bindings.sh && npm run build:webapp",
"devtest" : "npm run prepare-devtest && npm run start",
"devtest:we" : "npm run prepare-devtest && npm run dist -w webapp && BUILD_MODE='dev' npm run devtest -w we-applet",
"devtest:electron" : "npm run prepare-devtest && npm run devtest -w electron",

"prodtest" : "npm run dist -w webapp && HC_PORT=$(port) ADMIN_PORT=$(port) concurrently \"npm run start:happ-proxied\" \"sleep 8 && npm run start:ui -w webapp\"",
"prodtest:we" : "npm run dist -w webapp && npm run devtest -w we-applet",
"prodtest:electron" : "npm run build -w webcomponents && npm run dist -w webapp && npm run prodtest -w electron",
"prodtest" : "npm run clean:agents && npm run dist -w webapp && HC_PORT=$(port) ADMIN_PORT=$(port) concurrently \"npm run start:happ-proxied\" \"sleep 8 && npm run start:ui -w webapp\"",
"prodtest:we" : "npm run clean:agents && npm run dist -w webapp && npm run devtest -w we-applet",
"prodtest:electron" : "npm run clean:agents && npm run build -w webcomponents && npm run dist -w webapp && npm run prodtest -w electron",

"start:happ" : "RUST_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$ADMIN_PORT generate artifacts/snapmail.happ --run=$HC_PORT -a snapmail network mdns",
"start:happ-proxied" : "RUST_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$ADMIN_PORT generate artifacts/snapmail.happ --run=$HC_PORT -a snapmail network --bootstrap https://bootstrap-staging.holo.host/ quic -p=kitsune-proxy://SYVd4CF3BdJ4DS7KwLLgeU3_DbHoZ34Y-qroZ79DOs8/kitsune-quic/h/165.22.32.11/p/5779/--",
Expand Down
2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"lint": "eslint --ext .ts .",
"build": "rm -rf dist && tsc",
"dist": "rm -rf dist && tsc && rollup -c rollup.config.js",
"dist": "rollup -c rollup.config.js",
"build:watch": "run-singleton \"tsc -w --incremental --preserveWatchOutput\"",
"start:ui": "cp index.html dist && cp ../assets/favicon.ico dist && web-dev-server --config ./web-dev-server.config.mjs"
},
Expand Down

0 comments on commit 462ebea

Please sign in to comment.