You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sobald du ein Astro-Projekt hast, bist du bereit, mit Astro zu bauen! 🚀
11
12
@@ -21,23 +22,23 @@ Astro wird mit einem eingebauten Entwicklungsserver geliefert, der alles hat, wa
21
22
22
23
Jede Startvorlage wird mit einem vorkonfigurierten Skript geliefert, das `astro dev` für dich startet. Nachdem du in dein Projektverzeichnis navigiert hast, verwende deinen bevorzugten Paketmanager, um diesen Befehl auszuführen und den Astro-Entwicklungsserver zu starten.
23
24
24
-
<Tabs>
25
-
<TabItemlabel="npm">
25
+
<PackageManagerTabs>
26
+
<Fragmentslot="npm">
26
27
```shell
27
28
npm run dev
28
29
```
29
-
</TabItem>
30
-
<TabItemlabel="pnpm">
30
+
</Fragment>
31
+
<Fragmentslot="pnpm">
31
32
```shell
32
33
pnpm run dev
33
34
```
34
-
</TabItem>
35
-
<TabItemlabel="yarn">
35
+
</Fragment>
36
+
<Fragmentslot="yarn">
36
37
```shell
37
38
yarn run dev
38
39
```
39
-
</TabItem>
40
-
</Tabs>
40
+
</Fragment>
41
+
</PackageManagerTabs>
41
42
42
43
Wenn alles gut geht, wird Astro dein Projekt jetzt auf [http://localhost:4321/](http://localhost:4321/) bereitstellen. Besuche diesen Link in deinem Browser und sieh dir deine neue Seite an!
43
44
@@ -53,23 +54,23 @@ Wenn du dein Projekt nach dem Starten des Entwicklungsservers nicht im Browser
53
54
54
55
Um die Version deiner Website zu überprüfen, die zur Build-Zeit erstellt wird, beende den Entwicklungsserver (<kbd>Strg</kbd> + <kbd>C</kbd>) und führe den entsprechenden Build-Befehl für deinen Paketmanager in deinem Terminal aus:
55
56
56
-
<Tabs>
57
-
<TabItemlabel="npm">
57
+
<PackageManagerTabs>
58
+
<Fragmentslot="npm">
58
59
```shell
59
60
npm run build
60
61
```
61
-
</TabItem>
62
-
<TabItemlabel="pnpm">
62
+
</Fragment>
63
+
<Fragmentslot="pnpm">
63
64
```shell
64
65
pnpm build
65
66
```
66
-
</TabItem>
67
-
<TabItemlabel="yarn">
67
+
</Fragment>
68
+
<Fragmentslot="yarn">
68
69
```shell
69
70
yarn run build
70
71
```
71
-
</TabItem>
72
-
</Tabs>
72
+
</Fragment>
73
+
</PackageManagerTabs>
73
74
74
75
Astro erstellt eine einsatzbereite Version deiner Website in einem separaten Ordner (standardmäßig `dist/`) und du kannst den Fortschritt im Terminal beobachten. So wirst du auf Fehler in deinem Projekt aufmerksam gemacht, bevor du es in die Produktion überführst. Wenn TypeScript auf `strict` oder `strictest` konfiguriert ist, prüft das `build`-Skript dein Projekt auch auf Typfehler.
Once you have an Astro project, now you're ready to build with Astro! 🚀
10
11
@@ -20,23 +21,23 @@ Astro comes with a built-in development server that has everything you need for
20
21
21
22
Every starter template comes with a pre-configured script that will run `astro dev` for you. After navigating into your project directory, use your favorite package manager to run this command and start the Astro development server.
22
23
23
-
<Tabs>
24
-
<TabItemlabel="npm">
24
+
<PackageManagerTabs>
25
+
<Fragmentslot="npm">
25
26
```shell
26
27
npm run dev
27
28
```
28
-
</TabItem>
29
-
<TabItemlabel="pnpm">
29
+
</Fragment>
30
+
<Fragmentslot="pnpm">
30
31
```shell
31
32
pnpm run dev
32
33
```
33
-
</TabItem>
34
-
<TabItemlabel="yarn">
34
+
</Fragment>
35
+
<Fragmentslot="yarn">
35
36
```shell
36
37
yarn run dev
37
38
```
38
-
</TabItem>
39
-
</Tabs>
39
+
</Fragment>
40
+
</PackageManagerTabs>
40
41
41
42
42
43
If all goes well, Astro will now be serving your project on [http://localhost:4321/](http://localhost:4321/). Visit that link in your browser and see your new site!
@@ -53,23 +54,23 @@ If you aren't able to open your project in the browser after starting the dev se
53
54
54
55
To check the version of your site that will be created at build time, quit the dev server (<kbd>Ctrl</kbd> + <kbd>C</kbd>) and run the appropriate build command for your package manager in your terminal:
55
56
56
-
<Tabs>
57
-
<TabItemlabel="npm">
58
-
```shell
59
-
npm run build
60
-
```
61
-
</TabItem>
62
-
<TabItemlabel="pnpm">
63
-
```shell
64
-
pnpm build
65
-
```
66
-
</TabItem>
67
-
<TabItemlabel="yarn">
68
-
```shell
69
-
yarn run build
70
-
```
71
-
</TabItem>
72
-
</Tabs>
57
+
<PackageManagerTabs>
58
+
<Fragmentslot="npm">
59
+
```shell
60
+
npm run build
61
+
```
62
+
</Fragment>
63
+
<Fragmentslot="pnpm">
64
+
```shell
65
+
pnpm build
66
+
```
67
+
</Fragment>
68
+
<Fragmentslot="yarn">
69
+
```shell
70
+
yarn run build
71
+
```
72
+
</Fragment>
73
+
</PackageManagerTabs>
73
74
74
75
Astro will build a deploy-ready version of your site in a separate folder (`dist/` by default) and you can watch its progress in the terminal. This will alert you to any build errors in your project before you deploy to production. If TypeScript is configured to `strict` or `strictest`, the `build` script will also check your project for type errors.
[Clever Cloud](https://clever-cloud.com) is a European cloud platform that provides automated, scalable services.
12
13
@@ -45,49 +46,55 @@ To deploy your Astro project to Clever Cloud, you will need to **create a new ap
45
46
6. Skip [connecting **Add-ons** to your Clever application](https://www.clever-cloud.com/developers/doc/addons/) unless you're using a database or Keycloak.
46
47
7. Inject **environment variables**:
47
48
48
-
- For **Node.js**, no specific environment variable is needed to deploy Astro if you're using **npm**. If you're using **yarn** or **pnpm**, set the following environment variables:
49
+
- For **Node.js**, set the following environment variables based on your package manager:
49
50
50
-
<Tabs>
51
-
<TabItemlabel="pnpm">
51
+
<PackageManagerTabs>
52
+
<Fragmentslot="npm">
53
+
```shell
54
+
CC_NODE_BUILD_TOOL="npm"
55
+
CC_PRE_BUILD_HOOK="npm install && npm run astro telemetry disable && npm run build"
CC_PRE_BUILD_HOOK="yarn && yarn run astro telemetry disable"
87
94
CC_WEBROOT="/dist"
88
95
```
89
-
</TabItem>
90
-
</Tabs>
96
+
</Fragment>
97
+
</PackageManagerTabs>
91
98
92
99
93
100
8.**Deploy!** If you're deploying from **GitHub**, your deployment should start automatically. If you're using **Git**, copy the remote and push on the **master** branch.
¡Una vez que tengas un proyecto Astro, ya estás listo para empezar a construir con Astro! 🚀
10
11
@@ -20,23 +21,23 @@ Astro viene con un servidor de desarrollo incorporado que tiene todo lo que nece
20
21
21
22
Cada plantilla de inicio viene con un script pre-configurado que correrá el comando `astro dev` por ti. Despues de navegar al directorio de tu proyecto, usa tu manejador de paquetes favorito para correr este comando e iniciar el servidor de desarrollo Astro
22
23
23
-
<Tabs>
24
-
<TabItemlabel="npm">
24
+
<PackageManagerTabs>
25
+
<Fragmentslot="npm">
25
26
```shell
26
27
npm run dev
27
28
```
28
-
</TabItem>
29
-
<TabItemlabel="pnpm">
29
+
</Fragment>
30
+
<Fragmentslot="pnpm">
30
31
```shell
31
32
pnpm run dev
32
33
```
33
-
</TabItem>
34
-
<TabItemlabel="yarn">
34
+
</Fragment>
35
+
<Fragmentslot="yarn">
35
36
```shell
36
37
yarn run dev
37
38
```
38
-
</TabItem>
39
-
</Tabs>
39
+
</Fragment>
40
+
</PackageManagerTabs>
40
41
41
42
Si todo sale bien, Astro ahora estará sirviendo tu proyecto en [http://localhost:4321/](http://localhost:4321/). ¡Visita ese enlace en tu navegador y ve tu nuevo sitio!
42
43
@@ -52,23 +53,23 @@ Si no es posible abrir tu proyecto en el navegador después de iniciar el servid
52
53
53
54
Para revisar la versión de tu sitio que será creada en compilación, cierra el servidor de desarrollo (<kbd>Ctrl</kbd> + <kbd>C</kbd>) y en tu terminal corre el comando apropiado de compilación de tu manejador de paquetes:
54
55
55
-
<Tabs>
56
-
<TabItemlabel="npm">
57
-
```shell
58
-
npm run build
59
-
```
60
-
</TabItem>
61
-
<TabItemlabel="pnpm">
62
-
```shell
63
-
pnpm build
64
-
```
65
-
</TabItem>
66
-
<TabItemlabel="yarn">
67
-
```shell
68
-
yarn run build
69
-
```
70
-
</TabItem>
71
-
</Tabs>
56
+
<PackageManagerTabs>
57
+
<Fragmentslot="npm">
58
+
```shell
59
+
npm run build
60
+
```
61
+
</Fragment>
62
+
<Fragmentslot="pnpm">
63
+
```shell
64
+
pnpm build
65
+
```
66
+
</Fragment>
67
+
<Fragmentslot="yarn">
68
+
```shell
69
+
yarn run build
70
+
```
71
+
</Fragment>
72
+
</PackageManagerTabs>
72
73
73
74
Astro compilará una versión de tu sitio lista para ser desplegada en una carpeta separada (`dist/` por default) y podrás ver su progreso en la terminal. Este te alertará sobre cualquier error de compilación en tu proyecto antes de que despliegues a producción. Si Typescript está configurado en `strict` o `strictest`, el comando `build` también revisará tu proyecto por errores de tipado.
[Clever Cloud](https://clever-cloud.com) es una plataforma de nube europea que proporciona servicios automatizados y escalables.
12
13
@@ -44,49 +45,55 @@ Para desplegar tu proyecto Astro en Clever Cloud, necesitarás **crear una nueva
44
45
6. Omite [conectar **Add-ons** a tu aplicación Clever](https://developers.clever-cloud.com/doc/addons/) a menos que estés usando una base de datos o Keycloak.
45
46
7. Inyecta **variables de entorno**:
46
47
47
-
- Para **Node.js**, no se necesita ninguna variable de entorno específica para desplegar Astro si estás usando **npm**. Si estás usando **yarn** o **pnpm**, configura las siguientes variables de entorno:
48
+
- Para **Node.js**, configura las siguientes variables de entorno según tu gestor de paquetes:
48
49
49
-
<Tabs>
50
-
<TabItemlabel="pnpm">
50
+
<PackageManagerTabs>
51
+
<Fragmentslot="npm">
52
+
```shell
53
+
CC_NODE_BUILD_TOOL="npm"
54
+
CC_PRE_BUILD_HOOK="npm install && npm run astro telemetry disable && npm run build"
CC_PRE_BUILD_HOOK="yarn && yarn run astro telemetry disable"
86
93
CC_WEBROOT="/dist"
87
94
```
88
-
</TabItem>
89
-
</Tabs>
95
+
</Fragment>
96
+
</PackageManagerTabs>
90
97
91
98
8.**¡Despliega!** Si estás desplegando desde **GitHub**, tu despliegue debería comenzar automáticamente. Si estás usando **Git**, copia el remoto y sube a la rama **master**.
0 commit comments