From be3151a3e0b3dff1f9d4777118f4ff22869587df Mon Sep 17 00:00:00 2001 From: James Daniels Date: Wed, 11 Sep 2024 12:42:32 -0400 Subject: [PATCH] Fix concurrently in idx --- nextjs-end/package.json | 8 ++++---- nextjs-start/idx-template.json | 11 +++++++++++ nextjs-start/idx-template.nix | 11 +++++++++++ nextjs-start/package.json | 8 ++++---- 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 nextjs-start/idx-template.json create mode 100644 nextjs-start/idx-template.nix diff --git a/nextjs-end/package.json b/nextjs-end/package.json index 643dcf1c..ec618f33 100644 --- a/nextjs-end/package.json +++ b/nextjs-end/package.json @@ -3,17 +3,17 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "concurrently -r -k -P \"npm:dev:next -- {@}\" npm:dev:sw --", + "dev": "npx -y concurrently -r -k -P \"npm:dev:next -- {@}\" npm:dev:sw --", "dev:next": "next dev", "dev:sw": "npm run build:sw -- --watch", "build": "next build", - "build:sw": "esbuild auth-service-worker.js --bundle --minify --main-fields=webworker,browser,module,main --outfile=public/auth-service-worker.js", + "build:sw": "npx -y esbuild auth-service-worker.js --bundle --minify --main-fields=webworker,browser,module,main --outfile=public/auth-service-worker.js", "prebuild": "npm run build:sw", "start": "next start", - "lint": "concurrently -r \"npm:lint:next\" \"npm:lint:prettier\"", + "lint": "npx -y concurrently -r \"npm:lint:next\" \"npm:lint:prettier\"", "lint:next": "next lint", "lint:prettier": "prettier --check --ignore-path .gitignore .", - "lint:fix": "concurrently -r \"npm:lint:next -- --fix\" \"npm:lint:prettier -- --write\"" + "lint:fix": "npx -y concurrently -r \"npm:lint:next -- --fix\" \"npm:lint:prettier -- --write\"" }, "dependencies": { "@google/generative-ai": "^0.10.0", diff --git a/nextjs-start/idx-template.json b/nextjs-start/idx-template.json new file mode 100644 index 00000000..e8273155 --- /dev/null +++ b/nextjs-start/idx-template.json @@ -0,0 +1,11 @@ +{ + "name": "FriendlyEats NextJS (finished)", + "description": "Something something codelab", + "categories": ["Web", "Firebase", "Google Codelabs"], + "icon": "https://www.gstatic.com/monospace/231115/logo_react-native.svg", + "publisher": "Google LLC", + "host": { + "virtualization": true + }, + "params": [] +} \ No newline at end of file diff --git a/nextjs-start/idx-template.nix b/nextjs-start/idx-template.nix new file mode 100644 index 00000000..a1fece95 --- /dev/null +++ b/nextjs-start/idx-template.nix @@ -0,0 +1,11 @@ +{ pkgs, packageManager ? "npm", ... }: { + packages = [ + pkgs.nodejs_20 + pkgs.j2cli + pkgs.nixfmt + ]; + bootstrap = '' + npx -y giget gh:firebase/friendlyeats-web/nextjs-start#jamesdaniels_fixServiceWorkers "$WS_NAME" + mv "$WS_NAME" "$out" + ''; +} \ No newline at end of file diff --git a/nextjs-start/package.json b/nextjs-start/package.json index 643dcf1c..ec618f33 100644 --- a/nextjs-start/package.json +++ b/nextjs-start/package.json @@ -3,17 +3,17 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "concurrently -r -k -P \"npm:dev:next -- {@}\" npm:dev:sw --", + "dev": "npx -y concurrently -r -k -P \"npm:dev:next -- {@}\" npm:dev:sw --", "dev:next": "next dev", "dev:sw": "npm run build:sw -- --watch", "build": "next build", - "build:sw": "esbuild auth-service-worker.js --bundle --minify --main-fields=webworker,browser,module,main --outfile=public/auth-service-worker.js", + "build:sw": "npx -y esbuild auth-service-worker.js --bundle --minify --main-fields=webworker,browser,module,main --outfile=public/auth-service-worker.js", "prebuild": "npm run build:sw", "start": "next start", - "lint": "concurrently -r \"npm:lint:next\" \"npm:lint:prettier\"", + "lint": "npx -y concurrently -r \"npm:lint:next\" \"npm:lint:prettier\"", "lint:next": "next lint", "lint:prettier": "prettier --check --ignore-path .gitignore .", - "lint:fix": "concurrently -r \"npm:lint:next -- --fix\" \"npm:lint:prettier -- --write\"" + "lint:fix": "npx -y concurrently -r \"npm:lint:next -- --fix\" \"npm:lint:prettier -- --write\"" }, "dependencies": { "@google/generative-ai": "^0.10.0",