git clone https://github.com/HackMort/koselugo.git
npm install
npm run dev
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:3000 |
npm run build |
Build your production site to ./dist/ |
npm run css:build |
Build the final style.css & style.css.map for production site to ./dist/css/ |
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 |
You only need to run npm run css:build
before you commit your changes to the repository. In Development, you can use npm run dev
and let Astro translate the SCSS to CSS on the fly.
Install VSCode Extenstion Astro here to get syntax highlighting and other features.
Install VSCode Extenstion Astro Snippets here to easily create Astro components. Example:
a-base-cmp
This will create a base component with the following code:
---
type Props = {
}
const {} = Astro.props
---
<div>
</div>
<style></style>
โโโ public
โ โโโ favicon.svg
โ โโโ fonts
โ โโโ icons
โ โโโ images
โ โโโ pdf
โโโ src
โ โโโ components
โ โโโ env.d.ts
โ โโโ js
โ โโโ layouts
โ โโโ pages
โ โโโ styles
โ โโโ components
โ โโโ settings
โ โโโ style.scss
โโโ tsconfig.json
โโโ README.md
โโโ 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.
|
Feel free to check our documentation