Skip to content

Commit

Permalink
Switch from IDX import to template (#21)
Browse files Browse the repository at this point in the history
* Improve IDX support

* Update README.md

* Update idx-template.nix

* Update dev.nix
  • Loading branch information
rodydavis authored Nov 12, 2024
1 parent 7f1a0da commit 39a86e7
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 19 deletions.
10 changes: 3 additions & 7 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{pkgs, ...}:
let firebase-ext = pkgs.fetchurl {
url =
"https://firebasestorage.googleapis.com/v0/b/firemat-preview-drop/o/vsix%2Ffirebase-vscode-0.2.8.vsix?alt=media&token=ba272e6e-c6b3-4860-bc2a-cd5b9cd7e022";
hash = "sha256-n4D70K61vThL3Tdjq1lq2Z/+4CBLtRj7ePY8uiv0taw=";
"https://firebasestorage.googleapis.com/v0/b/firemat-preview-drop/o/vsix%2Ffirebase-vscode-idx-0.1.7.vsix?alt=media&token=83902099-e9e4-4ee8-b953-2deb6a3e0167";
hash = "sha256-OAYOxRcFyUR2tiaH1IdNmJeOhfR5c8G32bkqvzZZbbc=";
name = "firebase.vsix";
};
in {
channel = "stable-23.11";
channel = "stable-24.05";
packages = [
pkgs.nodePackages.firebase-tools
pkgs.jdk17
Expand Down Expand Up @@ -42,10 +42,6 @@
idx.workspace = {
# Runs when a workspace is first created with this `dev.nix` file
onCreate = {
git-lfs-fetch = ''
curl -o local.zip 'https://firebasestorage.googleapis.com/v0/b/yt-rag.appspot.com/o/genkit%2Flocal.zip?alt=media&token=2f1d181d-9eda-4dc1-9ffc-e988f69c26f2'
unzip local.zip -d .
'';
npm-install = ''
cd proxy
npm ci
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ below for you to follow!

We recommend trying this project in IDX since it handles all dependencies for you. You are able to launch this project in IDX and get going testing with only slight configuration required.

<a href="https://idx.google.com/import?url=https%3A%2F%2Fgithub.com%2FFirebaseExtended%2Fcompass-ai-travel-planning-sample-flutter">
<a href="https://idx.google.com/new?template=https%3A%2F%2Fgithub.com%2FFirebaseExtended%2Fcompass-ai-travel-planning-sample-flutter">
<picture>
<source
media="(prefers-color-scheme: dark)"
Expand Down
10 changes: 10 additions & 0 deletions idx-template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Compass",
"description": "AI Travel Planning app with Flutter",
"categories": ["AI & ML", "Mobile"],
"icon": "https://www.gstatic.com/monospace/231128/logo_gemini_512.png",
"publisher": "Google LLC",
"host": {
"virtualization": "true"
}
}
24 changes: 24 additions & 0 deletions idx-template.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{ pkgs, ... }: {
packages = [
pkgs.curl
pkgs.unzip
];
bootstrap = ''
mkdir "$out"
cp -rf ${./.}/* "$out"
mkdir "$out/.idx"
mkdir "$out/.vscode"
mkdir "$out/.firebase"
cp -rf ${./.}/.idx "$out"
cp -rf ${./.}/.vscode "$out"
cp -rf ${./.}/.firebase "$out"
cp -rf ${./.}/.firebaserc "$out"
cp -rf ${./.}/.gitignore "$out"
cp -rf ${./.}/.gitattributes "$out"
rm "$out/idx-template.nix"
rm "$out/idx-template.json"
curl -o local.zip 'https://firebasestorage.googleapis.com/v0/b/yt-rag.appspot.com/o/genkit%2Flocal.zip?alt=media&token=2f1d181d-9eda-4dc1-9ffc-e988f69c26f2'
unzip local.zip -d "$out"
chmod -R u+w "$out"
'';
}
22 changes: 11 additions & 11 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.19.0"
cross_file:
dependency: transitive
description:
Expand Down Expand Up @@ -452,18 +452,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
url: "https://pub.dev"
source: hosted
version: "10.0.5"
version: "10.0.7"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
url: "https://pub.dev"
source: hosted
version: "3.0.5"
version: "3.0.8"
leak_tracker_testing:
dependency: transitive
description:
Expand Down Expand Up @@ -668,7 +668,7 @@ packages:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
source_span:
dependency: transitive
description:
Expand Down Expand Up @@ -761,10 +761,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.0"
synchronized:
dependency: transitive
description:
Expand All @@ -785,10 +785,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
url: "https://pub.dev"
source: hosted
version: "0.7.2"
version: "0.7.3"
transparent_image:
dependency: "direct main"
description:
Expand Down

0 comments on commit 39a86e7

Please sign in to comment.