Dodawanie przycisku „Otwórz w Firebase Studio”
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Dzięki Firebase Studio możesz uprościć kroki, które musi wykonać osoba, która dopiero zaczyna pracę z Twoim kodem, aby skonfigurować środowisko programistyczne i zacząć efektywnie pracować.
Przykład:
Jeśli pracujesz w zespole z innymi współtwórcami, możesz dostosować środowisko do swojego projektu, a następnie zatwierdzić plik .idx/dev.nix
w repozytorium Git projektu. Dzięki temu, gdy członek zespołu zaimportuje Twoje repozytorium Git w Firebase Studio, jego nowy obszar roboczy będzie miał dokładnie taką samą konfigurację jak Twój, w tym te same pakiety systemowe, rozszerzenia IDE, skrypty startowe i inne elementy.
Jeśli tworzysz platformę lub bibliotekę do użytku przez inne osoby, możesz umieścić plik .idx/dev.nix
w repozytoriach przykładowego kodu, aby użytkownik importujący Twoje przykłady do Firebase Studio mógł pominąć konfigurację środowiska i od razu wypróbować Twoją platformę. Możesz nawet utworzyć własny szablon, który będzie zawierał Twoje sugestie i będzie stanowił punkt wyjścia dla użytkowników.
Gdy będziesz zadowolony(-a) z wprowadzonych zmian w środowisku, możesz ułatwić innym osobom importowanie projektu do Firebase Studio, dodając do dokumentacji, np. do pliku README.md
projektu, przycisk „Otwórz w Firebase Studio”.
Typowe punkty wejścia „Otwórz w Firebase Studio”
Dla przycisku „Otwórz w Firebase Studio” dostępnych jest kilka wzorców adresów URL:
Aby utworzyć link do procesu importowania repozytorium Git z wstępnie wypełnionym adresem URL repozytorium Git, użyj tego wzorca adresu URL:
https://studio.firebase.google.com/import?url=https://github.com/my-org/my-repo
Obecnie obsługiwane są tylko repozytoria GitHub (zarówno prywatne, jak i publiczne).
Aby utworzyć link do wstępnie zdefiniowanego szablonu przestrzeni roboczej, znajdź szablon, którego szukasz, na stronie Szablony w Firebase Studio i skopiuj jego adres URL. Powinien on mieć następujący format:
https://studio.firebase.google.com/new/gemini
Aby utworzyć link do niestandardowego szablonu wstępnie wypełnionego adresem URL szablonu w GitHubie, użyj tego wzorca adresu URL:
https://studio.firebase.google.com/new?template=https://github.com/my-org/my-template
Aby otworzyć App Prototyping agent z wstępnie wypełnionym promptem, użyj tego wzorca adresu URL:
https://studio.firebase.google.com/?prototypePrompt=Create an app that transforms sketches into a high-quality photograph with Gemini
Dodawanie przycisku „Otwórz w Firebase Studio”
Zainstaluj pakiet SDK Firebase Studio
Open in lub użyj tego narzędzia, aby wygenerować kod HTML przycisku Firebase Studio:
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[],[],null,["With Firebase Studio, you can simplify the steps for someone new to\nyour codebase to set up their development environment and get productive.\n\nFor example:\n\n- If you're **working on a team with other contributors** , you can\n [customize your environment](/docs/studio/customize-workspace)\n precisely for your project and then commit your `.idx/dev.nix` file to\n your project's Git repository. That way, when a teammate imports your\n Git repository in Firebase Studio, their new workspace will have\n the exact same configuration as yours, complete with the same system\n packages, IDE extensions, starter scripts, and more.\n\n- If you're **building a framework or library** for others to use, you\n can include a `.idx/dev.nix` file in your sample code repositories, so\n that when a user imports your samples into Firebase Studio, they\n can skip the environment setup and jump straight into trying out your\n framework. You can even [build your own, custom\n template](/docs/studio/custom-templates) as an opinionated,\n customizable starting point for your users.\n\nAfter you're happy with your environment customizations, you can make it\neven easier for others to import your project into Firebase Studio by\nadding an \"Open in Firebase Studio\" button to your documentation, such\nas your project's `README.md` file.\n\nCommon \"Open in Firebase Studio\" entry points\n\nThere are several URL patterns available for an \"Open in\nFirebase Studio\" button:\n\n- To link to the **import a Git repository** flow, prefilled with your Git\n repository URL, use this URL pattern:\n\n https://studio.firebase.google.com/import?url=https://github.com/my-org/my-repo\n\n At this time, only GitHub repositories are supported (both private and\n public).\n- To link to a **predefined workspace template** , find the template\n you're looking for in the\n [Templates](https://studio.firebase.google.com/templates) page in\n Firebase Studio, and copy its URL, which should follow this URL pattern:\n\n https://studio.firebase.google.com/new/gemini\n\n- To link to a **custom template**, prefilled with your template's GitHub URL,\n use this URL pattern:\n\n https://studio.firebase.google.com/new?template=https://github.com/my-org/my-template\n\n- To open the App Prototyping agent with a pre-filled prompt, use this URL\n pattern:\n\n https://studio.firebase.google.com/?prototypePrompt=Create an app that transforms sketches into a high-quality photograph with Gemini\n\nAdd an \"Open in Firebase Studio\" button\n\nInstall the [Open in Firebase Studio\nSDK](https://www.npmjs.com/package/@firebase-studio/open-sdk) or\nuse this tool to generate the HTML for a Firebase Studio button:"]]