File tree Expand file tree Collapse file tree 17 files changed +83
-81
lines changed
Expand file tree Collapse file tree 17 files changed +83
-81
lines changed Original file line number Diff line number Diff line change 3434 - name : Install dependencies
3535 run : pnpm install
3636
37- - name : Update IDX template
38- run : pnpm generate:idx
37+ - name : Update Firebase Studio template
38+ run : pnpm generate:firebase-studio
3939
4040 - name : Format
4141 run : pnpm run format
Original file line number Diff line number Diff line change 11# ` .idx-templates `
22
3- This directory contains [ custom templates] ( https://developers .google.com/idx/guides /custom-templates ) for the IDX cloud development environment.
3+ This directory contains [ custom templates] ( https://firebase .google.com/docs/studio /custom-templates ) for the Firebase Studio cloud development environment.
44
55There is a template each for Astro's ` latest ` and ` next ` branches.
66
@@ -9,7 +9,7 @@ There is a template each for Astro's `latest` and `next` branches.
99Each template contains the following files:
1010
1111- ` dev.nix ` — a Nix configuration for the packages in the dev environment, setup commands to run, etc.
12- - ` icon.png ` — the Astro logo, used in IDX ’s user interface.
13- - ` idx-template.json ` — configuration for the modal IDX shows when launching the template. This is kept in sync with templates from the Astro monorepo with the ` pnpm generate:idx ` script.
12+ - ` icon.png ` — the Astro logo, used in Firebase Studio ’s user interface.
13+ - ` idx-template.json ` — configuration for the modal Firebase Studio shows when launching the template. This is kept in sync with templates from the Astro monorepo with the ` pnpm generate:firebase-studio ` script.
1414- ` idx-template.nix ` — a Nix configuration for how to scaffold a new project. This runs ` create astro ` silently under the hood.
15- - ` README.md ` — IDX links to the template folder from its launcher, so this is a minimal welcome for visitors from that flow.
15+ - ` README.md ` — Firebase Studio links to the template folder from its launcher, so this is a minimal welcome for visitors from that flow.
Original file line number Diff line number Diff line change 1- # Astro × IDX
1+ # Astro × Firebase Studio
22
3- Get started on IDX with Astro’s official templates.
3+ Get started on Firebase Studio with Astro’s official templates.
44
5- <a href =" https://idx .google.com/new?template=https://github.com/withastro/astro.new/tree/main/.idx-templates/latest " >
6- <img height =" 32 " alt =" Open in IDX " src =" https://cdn.idx .dev/btn/open_dark_32.svg " >
5+ <a href =" https://studio.firebase .google.com/new?template=https://github.com/withastro/astro.new/tree/main/.idx-templates/latest " >
6+ <img height =" 32 " alt =" Open in Firebase Studio " src =" https://cdn.firebasestudio .dev/btn/open_dark_32.svg " >
77</a >
Original file line number Diff line number Diff line change 11# To learn more about how to use Nix to configure your environment
2- # see: https://developers .google.com/idx/guides/customize-idx-env
2+ # see: https://firebase .google.com/docs/studio/devnix-reference
33{ pkgs , ... } : {
44 # Which nixpkgs channel to use.
55 channel = "stable-24.05" ; # or "unstable"
99 env = { } ;
1010 idx = let
1111 # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
12- # Workaround for https://community.idx.dev/t/8374
13- # `idx.extensions` only work for extensions declared in the Nixpkgs derivation used internally by IDX,
14- # forked at some point from the official `release-24.05` channel.
15- # Instead of relying on IDX internal installation, we also add a startup script to install/update the extensions.
12+ # Workaround for https://community.firebasestudio.dev/t/8374
13+ # `idx.extensions` only work for extensions declared in the Nixpkgs derivation used internally
14+ # by Firebase Studio, forked at some point from the official `release-24.05` channel.
15+ # Instead of relying on Firebase Studio internal installation, we also add a startup script to
16+ # install/update the extensions.
1617 extensions = [ "astro-build.astro-vscode" ] ;
1718 in {
1819 inherit extensions ;
Original file line number Diff line number Diff line change 2020 "--template"
2121 astroTemplate
2222 "--git" # Initialize Git repository in the new workspace
23- "--no-install" # Skip installing dependency as it is done on a later phase of IDX startup
23+ "--no-install" # Skip installing dependency as it is done on a later phase of Firebase Studio startup
2424 "--skip-houston" # Skip the Houston animation since this command runs non-interactively
2525 "--yes" # Accept all default options
2626 ]
3131
3232 cd "$out"
3333
34- # Create IDX config directory in the workspace
34+ # Create Firebase Studio config directory in the workspace
3535 mkdir -p ".idx"
3636
37- # Copy the template development configuration into the IDX directory
37+ # Copy the template development configuration into the `.idx` directory
3838 # Use cat piped to a file so it doesn't carry the permissions from the Nix store (read-only and owned by a different user)
3939 cat ${ ./dev.nix } > ".idx/dev.nix"
4040 cp ${ ./icon.png } "$out/.idx/icon.png"
41-
42- # Overwrite extensions file for IDX so it doesn't show the extension recommendation popup
41+
42+ # Overwrite extensions file for Firebase Studio so it doesn't show the extension recommendation popup
4343 # The extension will be installed automatically
4444 mkdir -p .vscode
4545 cat ${ ./extensions.json } > ".vscode/extensions.json"
Original file line number Diff line number Diff line change 1- # Astro × IDX
1+ # Astro × Firebase Studio
22
3- Try experimental releases of Astro’s official templates in IDX .
3+ Try experimental releases of Astro’s official templates in Firebase Studio .
44
5- <a href =" https://idx .google.com/new?template=https://github.com/withastro/astro.new/tree/main/.idx-templates/next " >
6- <img height =" 32 " alt =" Try in IDX " src =" https://cdn.idx .dev/btn/try_dark_32.svg " >
5+ <a href =" https://studio.firebase .google.com/new?template=https://github.com/withastro/astro.new/tree/main/.idx-templates/next " >
6+ <img height =" 32 " alt =" Try in Firebase Studio " src =" https://cdn.firebasestudio .dev/btn/try_dark_32.svg " >
77</a >
Original file line number Diff line number Diff line change 11# To learn more about how to use Nix to configure your environment
2- # see: https://developers .google.com/idx/guides/customize-idx-env
2+ # see: https://firebase .google.com/docs/studio/devnix-reference
33{ pkgs , ... } : {
44 # Which nixpkgs channel to use.
55 channel = "stable-24.05" ; # or "unstable"
99 env = { } ;
1010 idx = let
1111 # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
12- # Workaround for https://community.idx.dev/t/8374
13- # `idx.extensions` only work for extensions declared in the Nixpkgs derivation used internally by IDX,
14- # forked at some point from the official `release-24.05` channel.
15- # Instead of relying on IDX internal installation, we also add a startup script to install/update the extensions.
12+ # Workaround for https://community.firebasestudio.dev/t/8374
13+ # `idx.extensions` only work for extensions declared in the Nixpkgs derivation used internally
14+ # by Firebase Studio, forked at some point from the official `release-24.05` channel.
15+ # Instead of relying on Firebase Studio internal installation, we also add a startup script to
16+ # install/update the extensions.
1617 extensions = [ "astro-build.astro-vscode" ] ;
1718 in {
1819 inherit extensions ;
Original file line number Diff line number Diff line change 2323 "--template"
2424 astroTemplate
2525 "--git" # Initialize Git repository in the new workspace
26- "--no-install" # Skip installing dependency as it is done on a later phase of IDX startup
26+ "--no-install" # Skip installing dependency as it is done on a later phase of Firebase Studio startup
2727 "--skip-houston" # Skip the Houston animation since this command runs non-interactively
2828 "--yes" # Accept all default options
2929 ]
3434
3535 cd "$out"
3636
37- # Create IDX config directory in the workspace
37+ # Create Firebase Studio config directory in the workspace
3838 mkdir -p ".idx"
3939
40- # Copy the template development configuration into the IDX directory
40+ # Copy the template development configuration into the `.idx` directory
4141 # Use cat piped to a file so it doesn't carry the permissions from the Nix store (read-only and owned by a different user)
4242 cat ${ ./dev.nix } > ".idx/dev.nix"
4343 cp ${ ./icon.png } "$out/.idx/icon.png"
44-
45- # Overwrite extensions file for IDX so it doesn't show the extension recommendation popup
44+
45+ # Overwrite extensions file for Firebase Studio so it doesn't show the extension recommendation popup
4646 # The extension will be installed automatically
4747 mkdir -p .vscode
4848 cat ${ ./extensions.json } > ".vscode/extensions.json"
Original file line number Diff line number Diff line change 1717 "lint" : " astro sync && run-s --continue-on-error lint:*" ,
1818 "lint:biome" : " biome lint ." ,
1919 "lint:astro" : " astro check" ,
20- "generate:idx " : " pnpm dlx tsx ./scripts/generate-idx -template.ts"
20+ "generate:firebase-studio " : " pnpm dlx tsx ./scripts/generate-firebase-studio -template.ts"
2121 },
2222 "prettier" : " @astrojs/site-kit/prettier" ,
2323 "dependencies" : {
Original file line number Diff line number Diff line change 11import { writeFile } from 'fs/promises' ;
2- import { getIdxParams } from '../src/data/examples-shared.js' ;
2+ import { getFirebaseStudioParams } from '../src/data/examples-shared.js' ;
33
4- await generateIDXTemplate ( 'latest' ) ;
5- await generateIDXTemplate ( 'next' ) ;
4+ await generateFirebaseStudioTemplate ( 'latest' ) ;
5+ await generateFirebaseStudioTemplate ( 'next' ) ;
66
7- async function generateIDXTemplate ( ref : 'latest' | 'next' ) {
7+ async function generateFirebaseStudioTemplate ( ref : 'latest' | 'next' ) {
88 console . time ( `Updated ${ ref } /idx-template.json` ) ;
99 // .idx-templates/latest/idx-template.json
1010 const template = {
@@ -17,7 +17,7 @@ async function generateIDXTemplate(ref: 'latest' | 'next') {
1717 name : 'Starter template' ,
1818 type : 'enum' ,
1919 default : 'basics' ,
20- options : await getIdxParams ( ref ) ,
20+ options : await getFirebaseStudioParams ( ref ) ,
2121 required : true ,
2222 } ,
2323 ] ,
You can’t perform that action at this time.
0 commit comments