https://github.com/corbaz/astro_v3
Framework Astro version 03
https://github.com/corbaz/astro_v3
Last synced: about 1 year ago
JSON representation
Framework Astro version 03
- Host: GitHub
- URL: https://github.com/corbaz/astro_v3
- Owner: corbaz
- Created: 2023-09-04T10:11:45.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-07T22:48:15.000Z (almost 3 years ago)
- Last Synced: 2025-02-09T01:39:41.491Z (over 1 year ago)
- Language: Astro
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Astro Starter Kit: Basics
julio.corbaz@gmail.com
```
npm create astro@latest -- --template basics
```
[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
> π§βπ **Seasoned astronaut?** Delete this file. Have fun!

## π Project Structure
Inside of your Astro project, you'll see the following folders and files:
```
/
βββ public/
β βββ favicon.svg
βββ src/
β βββ components/
β β βββ Card.astro
β βββ layouts/
β β βββ Layout.astro
β βββ pages/
β βββ index.astro
βββ package.json
```
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
Any static assets, like images, can be placed in the `public/` directory.
## π§ Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
## π Want to learn more?
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
# Astro con Tailwind
### InstalaciΓ³n
```cmd
node --version
18.17.1
npm -version
8.11.0
pnpm -v
8.6.7
nvm version
1.1.11
pnpm create astro@latest
npx astro add tailwind
npm install -g json-server
```
### package.json
```cmd
{
"name": "astrov3",
"type": "module",
"version": "0.0.1",
"scripts": {
"json-server": "json-server --watch ./src/data/db.json",
"dev": "astro dev --host",
"start": "astro dev --host",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"deploy-gh-pages": "astro build && gh-pages -d dist",
"deploy-surge": "astro build && surge dist astro-v3.surge.sh"
},
"dependencies": {
"@astrojs/react": "^3.0.1",
"@astrojs/tailwind": "^5.0.0",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"astro": "^3.0.10",
"json-server": "^0.17.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sonner": "^0.7.0",
"tailwindcss": "^3.3.3",
"tailwindcss-animated": "^1.0.1"
}
}
```
### npm run astro
```cmd
npm run astro
> astro03@0.0.1 astro
> astro
astro v3.0.7 Build faster websites.
astro [command] [...flags]
Commands
add Add an integration.
build Build your project and write it to disk.
check Check your project for errors.
dev Start the development server.
docs Open documentation in your web browser.
info List info about your current Astro setup.
preview Preview your build locally.
sync Generate content collection types.
telemetry Configure telemetry settings.
Global Flags
--config Specify your config file.
--root Specify your project root folder.
--site Specify your project site.
--base Specify your project base.
--verbose Enable verbose logging.
--silent Disable all logging.
--version Show the version number and exit.
--help Show this help message.
```
### npm run astro info
```cmd
Astro v3.0.7
Node v18.17.1
System Windows (x64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/tailwind
@astrojs/react"
npx astro add --help
astro add [...integrations] [...adapters]
Flags
--yes Accept all prompts.
--help Show this help message.
UI Frameworks
react astro add react
preact astro add preact
vue astro add vue
svelte astro add svelte
solid-js astro add solid-js
lit astro add lit
alpinejs astro add alpinejs
SSR Adapters
netlify astro add netlify
vercel astro add vercel
deno astro add deno
cloudflare astro add cloudflare
node astro add node
Others
tailwind astro add tailwind
image astro add image
mdx astro add mdx
partytown astro add partytown
sitemap astro add sitemap
prefetch astro add prefetch
For more integrations, check out: https://astro.build/integrations
```