diff --git a/apps/blog/.eslintrc.cjs b/apps/blog/.eslintrc.cjs index f0402bd..45e40ce 100644 --- a/apps/blog/.eslintrc.cjs +++ b/apps/blog/.eslintrc.cjs @@ -1,14 +1,7 @@ module.exports = { root: true, - env: { browser: true, es2020: true }, - extends: [ - "plugin:react-hooks/recommended", - "@developomp-site/eslint-config", - ], - parserOptions: { ecmaVersion: "latest", sourceType: "module" }, - plugins: ["react-refresh"], + extends: ["next/core-web-vitals", "@developomp-site/eslint-config"], rules: { - "react-refresh/only-export-components": "warn", "react-hooks/exhaustive-deps": "off", }, } diff --git a/apps/blog/.gitignore b/apps/blog/.gitignore new file mode 100644 index 0000000..8f322f0 --- /dev/null +++ b/apps/blog/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/apps/blog/index.html b/apps/blog/index.html deleted file mode 100644 index dca313c..0000000 --- a/apps/blog/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - pomp's blog - - - - - - - - - - - - -
- - - diff --git a/apps/blog/next.config.js b/apps/blog/next.config.js new file mode 100644 index 0000000..dd90483 --- /dev/null +++ b/apps/blog/next.config.js @@ -0,0 +1,8 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + output: "export", + distDir: "build", + images: { unoptimized: true }, +} + +module.exports = nextConfig diff --git a/apps/blog/package.json b/apps/blog/package.json index 27d1748..d724b13 100644 --- a/apps/blog/package.json +++ b/apps/blog/package.json @@ -2,49 +2,46 @@ "name": "@developomp-site/blog", "version": "0.0.0", "private": true, - "type": "module", "scripts": { - "dev": "vite", - "build": "vite build", - "lint": "eslint .", - "preview": "vite preview", + "dev": "open-cli http://localhost:3000 && next dev", + "build": "next build", + "lint": "next lint", "clean": "rm -rf .turbo build node_modules" }, - "dependencies": { + "devDependencies": { "@developomp-site/content": "workspace:*", + "@developomp-site/eslint-config": "workspace:*", + "@developomp-site/prettier-config": "workspace:*", + "@developomp-site/tailwind-config": "workspace:*", "@fontsource/noto-sans-kr": "^5.0.5", "@fontsource/source-code-pro": "^5.0.5", "@fortawesome/free-brands-svg-icons": "^6.4.0", "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@kunukn/react-collapse": "^2.2.10", - "highlight.js": "^11.8.0", - "hoofd": "^1.7.0", - "katex": "^0.16.8", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "wouter": "^2.11.0", - "zustand": "^4.3.9" - }, - "devDependencies": { - "@developomp-site/eslint-config": "workspace:*", - "@developomp-site/prettier-config": "workspace:*", - "@developomp-site/tailwind-config": "workspace:*", "@types/highlight.js": "^10.1.0", - "@types/katex": "^0.16.0", - "@types/react": "^18.2.14", + "@types/katex": "^0.16.2", + "@types/node": "20.4.5", + "@types/react": "18.2.17", "@types/react-collapse": "^5.0.1", - "@types/react-dom": "^18.2.6", - "@typescript-eslint/eslint-plugin": "^5.61.0", - "@typescript-eslint/parser": "^5.61.0", - "@vitejs/plugin-react": "^4.0.2", - "eslint": "^8.44.0", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.2", - "prettier-plugin-tailwindcss": "^0.3.0", - "tailwindcss": "^3.3.2", - "typescript": "^5.1.6", - "vite": "^4.4.2", - "vite-plugin-dynamic-import": "^1.5.0" + "@types/react-dom": "18.2.7", + "@typescript-eslint/eslint-plugin": "^6.2.0", + "@typescript-eslint/parser": "^6.2.0", + "autoprefixer": "10.4.14", + "eslint": "8.45.0", + "eslint-config-next": "13.4.12", + "eslint-plugin-prettier": "^4.2.1", + "highlight.js": "^11.8.0", + "katex": "^0.16.8", + "next": "13.4.12", + "open-cli": "^7.2.0", + "postcss": "8.4.27", + "prettier": "^2.8.8", + "prettier-plugin-tailwindcss": "^0.4.1", + "react": "18.2.0", + "react-dom": "18.2.0", + "tailwindcss": "3.3.3", + "typescript": "5.1.6", + "zustand": "^4.3.9" } } diff --git a/apps/blog/postcss.config.js b/apps/blog/postcss.config.js index d41ad63..fef1b22 100644 --- a/apps/blog/postcss.config.js +++ b/apps/blog/postcss.config.js @@ -1,4 +1,4 @@ -export default { +module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, diff --git a/apps/blog/src/App.tsx b/apps/blog/src/App.tsx deleted file mode 100644 index 7d84dfd..0000000 --- a/apps/blog/src/App.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { useTitleTemplate } from "hoofd" -import { Route, Switch } from "wouter" - -import Footer from "@/components/Footer" -import Header from "@/components/Header" -import Loading from "@/components/Loading" -import Home from "@/pages/Home" -import NotFound from "@/pages/NotFound" -import Page from "@/pages/Page" - -function App() { - useTitleTemplate("pomp's blog | %s") - - return ( - <> -
-
- - - - - {/* - - */} - - - - - - - - - - -
-