-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b31fdc5
commit 064fbc5
Showing
31 changed files
with
5,168 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
extends: ['plugin:astro/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
sourceType: 'module', | ||
ecmaVersion: 'latest' | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.astro'], | ||
parser: 'astro-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser', | ||
extraFileExtensions: ['.astro'] | ||
}, | ||
rules: { | ||
// override/add rules settings here, such as: | ||
// "astro/no-set-html-directive": "error" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# build output | ||
dist/ | ||
|
||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"semi": false, | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], | ||
"pluginSearchDirs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"astro", | ||
"typescript", | ||
"typescriptreact" | ||
], | ||
"prettier.documentSelectors": ["**/*.astro"], | ||
"[astro]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,49 @@ | ||
# astro-base | ||
Base template for Astro projects | ||
# Astro Base | ||
|
||
Minimal [Astro](https://astro.build) starter for new projects. MIT licence. | ||
|
||
Uses: | ||
|
||
- [Typescript](https://www.typescriptlang.org/) | ||
- [Prettier](https://prettier.io/) | ||
- [ESLint](https://eslint.org/) | ||
- [UnoCSS](https://unocss.dev/) | ||
- `@astrojs/sitemap` and `@astrojs/rss` preintegrated | ||
- Heroicons and SVG Logos preloaded via [Iconify](https://iconify.design/) | ||
|
||
## 🚀 Project Structure | ||
|
||
Inside of your Astro project, you'll see the following folders and files: | ||
|
||
```text | ||
/ | ||
├── 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 | | ||
| :------------------------ | :----------------------------------------------- | | ||
| `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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { defineConfig } from 'astro/config' | ||
import UnoCSS from 'unocss/astro' | ||
import sitemap from "@astrojs/sitemap" | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
experimental: { | ||
assets: true | ||
}, | ||
site: 'https://astro-base.netlify.app', | ||
integrations: [ | ||
UnoCSS({ | ||
injectReset: true | ||
}), | ||
sitemap() | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[dev] | ||
targetPort = 3000 | ||
command = "pnpm run dev" | ||
|
||
[build] | ||
command = "pnpm run build" | ||
functions = "netlify/functions" | ||
publish = "dist" | ||
|
||
[functions] | ||
node_bundler = "esbuild" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "astro-base", | ||
"type": "module", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro build; prettier --write \"dist/**/*.{js,html,css}\"", | ||
"preview": "astro preview", | ||
"lint": "pnpm run lint:prettier && pnpm run lint:eslint", | ||
"lint:prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx,md,mdx,astro}\"", | ||
"lint:eslint": "eslint --fix \"src/**/*.{js,ts,jsx,tsx,astro}\"" | ||
}, | ||
"dependencies": { | ||
"@astrojs/rss": "^2.4.3", | ||
"@astrojs/sitemap": "^1.3.1", | ||
"astro": "^2.5.3" | ||
}, | ||
"devDependencies": { | ||
"@iconify-json/heroicons": "^1.1.10", | ||
"@iconify-json/logos": "^1.1.31", | ||
"@julr/unocss-preset-forms": "^0.0.5", | ||
"@types/node": "^20.2.3", | ||
"@typescript-eslint/parser": "^5.59.7", | ||
"@unocss/reset": "^0.52.1", | ||
"eslint": "^8.41.0", | ||
"eslint-plugin-astro": "^0.27.0", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"prettier": "^2.8.8", | ||
"prettier-config-standard": "^5.0.0", | ||
"prettier-plugin-astro": "^0.9.0", | ||
"prettier-plugin-tailwindcss": "^0.3.0", | ||
"typescript": "^5.0.4", | ||
"unocss": "^0.52.1", | ||
"vite": "^4.3.8" | ||
} | ||
} |
Oops, something went wrong.