Skip to content

Commit

Permalink
Moved playground to nix
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Oct 28, 2024
1 parent 6ce71b5 commit 58b074d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions templates/app/web-app/flake.nix.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -36,6 +37,7 @@
];
packages = [
inputs'.scaffolding.packages.hc-scaffold-app-template
inputs'.playground.packages.hc-playground
];
};
};
Expand Down
3 changes: 1 addition & 2 deletions templates/app/web-app/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
"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",
"build:happ": "nix build -L .#{{app_name}} -o workdir/{{app_name}}.happ",
"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",
Expand Down
2 changes: 2 additions & 0 deletions templates/zome/web-app/flake.nix.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
Expand Down Expand Up @@ -53,6 +54,7 @@

packages = [
inputs'.scaffolding.packages.hc-scaffold-zome-template
inputs'.playground.packages.hc-playground
];
};

Expand Down
3 changes: 1 addition & 2 deletions templates/zome/web-app/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 58b074d

Please sign in to comment.