byBretema / astro-eslint-template

Astro template with EsLint packages preconfigured, to start coding as fast as possible :)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Awesome Astro: now with EsLint

A template by @DaBretema

template-screenshot

πŸ™‹β€β™‚οΈ How to use

Short path

  1. Use Github Template to create a new repository from this

    template-screenshot

  2. Clone YOUR repo and begin to code!

    # Clone
    git clone git@github.com:<your-user>/<your-repo>.git
    
    # Install packages
    pnpm install
    
    # Happy coding!

Long path

# Clone
git clone git@github.com:DaBretema/my-website.git --depth 1
cd my-website
rm -rf .git

# Set up your repo (first you have to create your repo on github)
git remote add origin git@github.com:<your-user>/<your-repo>.git
git add -A
git commit -m "my awesome first commit"
git push

# Install packages
pnpm install

# Happy coding!

πŸš€ Project Structure

Inside of your Astro project, you'll see the following folders and files:

/
β”œβ”€β”€ .vscode/
β”œβ”€β”€ public/
β”‚   └── favicon.svg
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   └── Card.astro
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   └── Layout.astro
β”‚   └── pages/
β”‚       └── index.astro
β”œβ”€β”€ package.json
β”œβ”€β”€ .editorconfig
β”œβ”€β”€ .eslintignore
β”œβ”€β”€ .eslintrc
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .npmrc
β”œβ”€β”€ .prettierrc.cjs
β”œβ”€β”€ .astro.config.mjs
β”œβ”€β”€ .tailwind.config.cjs
β”œβ”€β”€ .tsconfig.json
└── README.md

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
pnpm install Installs dependencies
pnpm run dev Starts local dev server at localhost:3000
pnpm run build Build your production site to ./dist/
pnpm run preview Preview your build locally, before deploying
pnpm run astro ... Run CLI commands like astro add, astro check
pnpm run astro -- --help Get help using the Astro CLI

πŸ‘€ Want to learn more?

Feel free to check Astro documentation or jump into their Discord server.

πŸ“ Pending tasks

About

Astro template with EsLint packages preconfigured, to start coding as fast as possible :)


Languages

Language:Astro 81.6%Language:JavaScript 18.4%