From 58b074d6f4fef28281e02f67e65f37fd2b0b248f Mon Sep 17 00:00:00 2001 From: "guillem.cordoba" Date: Mon, 28 Oct 2024 12:29:27 +0100 Subject: [PATCH] Moved playground to nix --- templates/app/web-app/flake.nix.hbs | 2 ++ templates/app/web-app/package.json.hbs | 3 +-- templates/zome/web-app/flake.nix.hbs | 2 ++ templates/zome/web-app/package.json.hbs | 3 +-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/app/web-app/flake.nix.hbs b/templates/app/web-app/flake.nix.hbs index e90c4a1..0746316 100644 --- a/templates/app/web-app/flake.nix.hbs +++ b/templates/app/web-app/flake.nix.hbs @@ -9,6 +9,7 @@ hc-infra.url = "github:holochain-open-dev/infrastructure"; scaffolding.url = "github:holochain-open-dev/templates"; + playground.url = "github:darksoil-studio/holochain-playground"; }; outputs = inputs: @@ -36,6 +37,7 @@ ]; packages = [ inputs'.scaffolding.packages.hc-scaffold-app-template + inputs'.playground.packages.hc-playground ]; }; }; diff --git a/templates/app/web-app/package.json.hbs b/templates/app/web-app/package.json.hbs index d7e0ab8..02f7a82 100644 --- a/templates/app/web-app/package.json.hbs +++ b/templates/app/web-app/package.json.hbs @@ -3,7 +3,7 @@ "private": true, "scripts": { "start": "AGENTS=2 pnpm network", - "network": "hc s clean && pnpm run build:happ && BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) UI_PORT=8888 concurrently -k \"pnpm -F ui start\" \"pnpm run launch\" \"holochain-playground\" \"pnpm local-services\"", + "network": "hc s clean && pnpm run build:happ && BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) UI_PORT=8888 concurrently -k \"pnpm -F ui start\" \"pnpm run launch\" \"hc playground\" \"pnpm local-services\"", "launch": "echo pass | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/{{app_name}}.happ --ui-port $UI_PORT network --bootstrap http://127.0.0.1:$BOOTSTRAP_PORT webrtc ws://127.0.0.1:$SIGNAL_PORT", "local-services": "hc run-local-services --bootstrap-port $BOOTSTRAP_PORT --signal-port $SIGNAL_PORT", "test": "pnpm run build:happ && nix flake check -L && pnpm -F tests test", @@ -11,7 +11,6 @@ "package": "nix build -L .#{{app_name}}.meta.release -o workdir/{{app_name}}.happ && pnpm -F ui package && hc web-app pack workdir" }, "devDependencies": { - "@holochain-playground/cli": "^0.300.0-rc", "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@eslint/js": "^8.0.0", "concurrently": "^6.2.1", diff --git a/templates/zome/web-app/flake.nix.hbs b/templates/zome/web-app/flake.nix.hbs index cfb07de..ba9fd1b 100644 --- a/templates/zome/web-app/flake.nix.hbs +++ b/templates/zome/web-app/flake.nix.hbs @@ -9,6 +9,7 @@ hc-infra.url = "github:holochain-open-dev/infrastructure"; scaffolding.url = "github:holochain-open-dev/templates"; + playground.url = "github:darksoil-studio/holochain-playground"; profiles.url = "github:holochain-open-dev/profiles/nixify"; }; @@ -53,6 +54,7 @@ packages = [ inputs'.scaffolding.packages.hc-scaffold-zome-template + inputs'.playground.packages.hc-playground ]; }; diff --git a/templates/zome/web-app/package.json.hbs b/templates/zome/web-app/package.json.hbs index 27d74c7..51f404f 100644 --- a/templates/zome/web-app/package.json.hbs +++ b/templates/zome/web-app/package.json.hbs @@ -3,14 +3,13 @@ "private": true, "scripts": { "start": "AGENTS=2 pnpm network", - "network": "hc s clean && pnpm build:happ && BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) UI_PORT=8888 concurrently -k \"pnpm -F @holochain-open-dev/{{kebab_case app_name}} start\" \"pnpm launch\" \"holochain-playground\" \"pnpm local-services\"", + "network": "hc s clean && pnpm build:happ && BOOTSTRAP_PORT=$(port) SIGNAL_PORT=$(port) UI_PORT=8888 concurrently -k \"pnpm -F @holochain-open-dev/{{kebab_case app_name}} start\" \"pnpm launch\" \"hc playground\" \"pnpm local-services\"", "launch": "echo pass | RUST_LOG=warn hc launch --piped -n $AGENTS workdir/{{app_name}}_test.happ --ui-port $UI_PORT network --bootstrap http://127.0.0.1:$BOOTSTRAP_PORT webrtc ws://127.0.0.1:$SIGNAL_PORT", "local-services": "hc run-local-services --bootstrap-port $BOOTSTRAP_PORT --signal-port $SIGNAL_PORT", "test": "pnpm build:happ && nix flake check -L && pnpm -F tests test", "build:happ": "nix build -L .#{{snake_case app_name}}_test_happ -o workdir/{{app_name}}_test.happ" }, "devDependencies": { - "@holochain-playground/cli": "^0.300.0-rc", "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@eslint/js": "^8.0.0", "concurrently": "^6.2.1",