Skip to content

Commit

Permalink
feat: initial setup
Browse files Browse the repository at this point in the history
astro, shadcn (react/tailwind/radix ui), prettier/eslint
  • Loading branch information
chuangcaleb committed Jul 19, 2023
1 parent 83a1929 commit 78e40dc
Show file tree
Hide file tree
Showing 17 changed files with 2,354 additions and 278 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
.github
.changeset
42 changes: 42 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = {
env: {
node: true,
browser: true,
es2021: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:astro/recommended",
"plugin:astro/jsx-a11y-recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["@typescript-eslint", "react"],
rules: {},
overrides: [
{
files: ["*.astro"],
parser: "astro-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
},
rules: {
"react/react-in-jsx-scope": ["off"],
},
},
{
files: [".jsx", ".tsx"],
extends: ["plugin:react/recommended"],
plugins: ["react"],
rules: {},
},
],
globals: {
astroHTML: true,
},
};
18 changes: 18 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @type {import("prettier").Config} */
module.exports = {
plugins: [
require.resolve("prettier-plugin-astro"),
require.resolve("prettier-plugin-tailwindcss"),
],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
tabWidth: 2,
singleQuote: false,
astroAllowShorthand: false,
};
4 changes: 0 additions & 4 deletions .vscode/extensions.json

This file was deleted.

11 changes: 0 additions & 11 deletions .vscode/launch.json

This file was deleted.

18 changes: 16 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
import { defineConfig } from 'astro/config';
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import react from "@astrojs/react";

// https://astro.build/config
export default defineConfig({});
export default defineConfig({
integrations: [
tailwind({
applyBaseStyles: false,
}),
react(),
],
vite: {
ssr: {
noExternal: ["@radix-ui/*"],
},
},
});
16 changes: 16 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/styles/global.css",
"baseColor": "neutral",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
30 changes: 27 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "",
"name": "powerkids-site",
"type": "module",
"version": "0.0.1",
"scripts": {
Expand All @@ -10,6 +10,30 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.8.4"
"@astrojs/react": "^2.2.1",
"@astrojs/tailwind": "^4.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"astro": "^2.8.5",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"lucide-react": "^0.261.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.3.3",
"tailwindcss-animate": "^1.0.6"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"eslint": "^8.45.0",
"eslint-plugin-astro": "^0.27.2",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"prettier": "^3.0.0",
"prettier-plugin-astro": "^0.11.0",
"prettier-plugin-tailwindcss": "^0.4.1"
}
}
}
Loading

0 comments on commit 78e40dc

Please sign in to comment.