git clone https://github.com/HackMort/ALPD.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 need to have
Nodejs
installed on your machine. You can follow our guide here to install along with other tools we use in our projects. - You only need to run
npm run css:build
before you commit your changes to the repository. In Development, you can usenpm 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
β βββ js
β β βββ scripts.js
β βββ assets
β βββ fonts
β βββ icons
β βββ pdf
β βββ images
β βββimages-per-page
βββ src
β βββ components
β βββ layouts
β βββ pages
β βββ styles
β βββ components
β βββ settings
β βββ style.scss
βββ tsconfig.json
βββ README.md
βββ package.json
Astro looks for .astro
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 Components.
Any static assets, like images, can be placed in the public/
directory.
|
Feel free to check our documentation