Skip to content

Commit 4a05203

Browse files
committed
scripts and configs to package applet webhapp
1 parent 4cef334 commit 4a05203

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

happ/workdir/applet/happ.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
manifest_version: "1"
2+
name: acorn
3+
description: productivity tool for distributed software teams
4+
roles:
5+
- id: acorn-applet
6+
provisioning:
7+
strategy: create
8+
deferred: false
9+
dna:
10+
bundled: "../projects.dna"
11+
clone_limit: 0

happ/workdir/applet/web-happ.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
manifest_version: "1"
3+
name: acorn-applet
4+
ui:
5+
bundled: "../../../web/ui.zip"
6+
happ_manifest:
7+
bundled: "../acorn_applet.happ"

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"happ-install": "bash scripts/install-hc-tools.sh",
1313
"happ-test": "bash scripts/happ-test.sh",
1414
"happ-pack": "bash scripts/happ-pack.sh",
15+
"applet-happ-pack": "bash scripts/applet-happ-pack.sh",
1516
"happ-reset": "npm run happ-pack && npm run user-data-reset",
1617
"user-data-reset": "rm -rf user2-data && rm -rf user-data && mkdir user2-data user-data",
1718
"web-install": "cd web && npm install",
@@ -20,7 +21,7 @@
2021
"web-build": "cd web && npx webpack --config webpack.prod.js",
2122
"applet-build": "cd web && npx webpack --config webpack.applet.js",
2223
"package-applet-ui": "rimraf ui.zip && npm run applet-build && cd web/applet-dist && bestzip ../ui.zip index.js",
23-
"package-applet": "rimraf ./happ/workdir/acorn-applet.webhapp && npm run package-applet-ui && hc web-app pack ./happ/workdir",
24+
"package-applet": "rimraf ./happ/workdir/acorn-applet.webhapp && npm run applet-happ-pack && npm run package-applet-ui && hc web-app pack ./happ/workdir/applet",
2425
"electron-install": "cd electron && npm install",
2526
"electron": "cd electron && npm run start",
2627
"electron2": "cd electron && ACORN_TEST_USER_2=1 npm run start",

scripts/applet-happ-pack.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# Compile the WASM
3+
cargo build --release --target wasm32-unknown-unknown --manifest-path happ/zomes/projects/Cargo.toml
4+
cargo build --release --target wasm32-unknown-unknown --manifest-path happ/zomes/projects_integrity/Cargo.toml
5+
# Pack DNAs
6+
hc dna pack --output=happ/workdir/projects.dna happ/workdir/dna/projects
7+
8+
# Pack hApp
9+
hc app pack --output=happ/workdir/acorn_applet.happ happ/workdir/applet

0 commit comments

Comments
 (0)