Skip to content

Commit

Permalink
chore: remove prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Mar 28, 2023
1 parent 3e81865 commit 8c98276
Show file tree
Hide file tree
Showing 42 changed files with 2,190 additions and 4,529 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GOOGLE_ANALYTICS_ID=G-TJPM96BXDH
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ on:
- main

jobs:
deploy:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2

- run: pnpm install --frozen-lockfile
- run: pnpm run check
- run: pnpm run build
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Release

permissions:
contents: write

on:
push:
tags:
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ node_modules
*.log*
*.local
dist-ssr

.vercel
dist/
dev-dist
.vite-ssg-temp

# generated types
.astro/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
strict-peer-dependencies=false
shell-emulator=true
34 changes: 17 additions & 17 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{
"editor.formatOnSave": true,
"eslint.enable": false,
"[typescript]": {
"editor.formatOnSave": true
},
"[html]": {
"editor.formatOnSave": false
},
"[markdown]": {
"editor.formatOnSave": false
},
"prettier.configPath": "",
"prettier.documentSelectors": ["**/*.astro"],
"[astro]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"css.customData": ["./unocss.json"],
"prettier.requireConfig": true,
"eslint.validate": [
"vue",
"yaml",
"html",
"json",
"jsonc",
"json5",
"astro",
"markdown",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact"
],
"cSpell.allowCompoundWords": true,
"cSpell.words": [
"amap",
Expand All @@ -31,6 +28,9 @@
"iconify",
"pnpm",
"shiki",
"sindresorhus",
"solidjs",
"tsconfigs",
"unocss",
"unplugin",
"vite",
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

My personal website.

## Prior Art
## Design and Code

Deeply thank to [antfu](https://github.com/antfu) for his amazing work.

- [antfu.me](https://github.com/antfu/antfu.me)
- [vitesse](https://github.com/antfu/vitesse)
[sindresorhus](https://sindresorhus.com)
35 changes: 35 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { defineConfig } from 'astro/config'
import unocss from 'unocss/astro'
import solidJs from '@astrojs/solid-js'

import node from '@astrojs/node'
import vercel from '@astrojs/vercel/edge'
import netlify from '@astrojs/netlify/edge-functions'

import { META } from './src/config'

const envAdapter = () => {
if (process.env.OUTPUT === 'vercel') {
return vercel()
} else if (process.env.OUTPUT === 'netlify') {
return netlify()
} else {
return node({
mode: 'standalone',
})
}
}

export default defineConfig({
site: META.origin,

integrations: [unocss(), solidJs()],

output: 'server',

adapter: envAdapter(),

vite: {
plugins: [],
},
})
59 changes: 0 additions & 59 deletions astro.config.mts

This file was deleted.

7 changes: 7 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build.environment]
NETLIFY_USE_PNPM = "true"
NODE_VERSION = "18"

[build]
command = "OUTPUT=netlify astro build"
publish = "dist"
54 changes: 26 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,54 @@
{
"name": "ntnyq.com",
"type": "module",
"version": "0.0.2",
"private": true,
"packageManager": "pnpm@7.27.0",
"packageManager": "pnpm@8.0.0",
"license": "MIT",
"author": {
"name": "ntnyq",
"email": "ntnyq13@gmail.com"
},
"scripts": {
"astro": "astro",
"build": "astro build",
"build:netlify": "OUTPUT=netlify astro build",
"build:vercel": "OUTPUT=vercel astro build",
"check": "astro check",
"dev": "astro dev",
"fmt": "prettier -w .",
"fmt:check": "prettier --check .",
"prepare": "husky install",
"preview": "astro preview",
"release": "bumpp"
},
"dependencies": {
"@astrojs/image": "^0.15.1",
"@astrojs/mdx": "^0.17.2",
"@astrojs/partytown": "^1.0.3",
"@astrojs/rss": "^2.1.1",
"@astrojs/sitemap": "^1.1.0",
"astro": "^2.0.17",
"workbox-window": "^6.5.4"
"@astrolib/seo": "^0.3.0",
"@nanostores/solid": "^0.3.2",
"@unocss/reset": "^0.50.6",
"astro": "^2.1.7",
"dayjs": "^1.11.7",
"nanostores": "^0.7.4",
"solid-js": "^1.6.16"
},
"devDependencies": {
"@iconify/json": "^2.2.30",
"@ntnyq/prettier-config": "^1.4.0",
"@astrojs/netlify": "^2.2.0",
"@astrojs/node": "^5.1.0",
"@astrojs/solid-js": "^2.1.0",
"@astrojs/vercel": "^3.2.1",
"@iconify/json": "^2.2.40",
"@ntnyq/prettier-config": "^1.6.1",
"@types/fs-extra": "^11.0.1",
"@types/node": "18.14.5",
"@types/nprogress": "^0.2.0",
"@unocss/postcss": "^0.50.3",
"@unocss/reset": "^0.50.3",
"@vite-pwa/astro": "^0.0.4",
"dayjs": "^1.11.7",
"fs-extra": "^11.1.0",
"@types/node": "18.15.10",
"fs-extra": "^11.1.1",
"husky": "^8.0.3",
"nano-staged": "^0.8.0",
"npm-run-all": "^4.1.5",
"pnpm": "^7.28.0",
"prettier": "^2.8.4",
"prettier-plugin-astro": "^0.8.0",
"rollup": "^3.18.0",
"sharp": "^0.31.3",
"typescript": "^4.9.5",
"unocss": "^0.50.3",
"vite": "^4.1.4"
"pnpm": "^8.0.0",
"prettier": "^2.8.7",
"typescript": "^5.0.2",
"unocss": "^0.50.6"
},
"prettier": "@ntnyq/prettier-config",
"nano-staged": {
"*.{js,ts,vue,yml,yaml,json,md}": "prettier --write"
"*": "prettier -wu"
}
}

1 comment on commit 8c98276

@vercel
Copy link

@vercel vercel bot commented on 8c98276 Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.