Skip to content

Commit

Permalink
Merge news into separate page
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxuanjun committed Oct 4, 2024
1 parent 6f2cbc9 commit 2e95641
Show file tree
Hide file tree
Showing 28 changed files with 1,676 additions and 2,093 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Build Stage
FROM sawacl/node-pnpm as build-stage
FROM gplane/pnpm as build-stage
WORKDIR /app
COPY . ./
RUN pnpm install && pnpm build

# Production Stage
FROM georgjung/nginx-brotli as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY service-start.sh /start.sh
COPY service-start.sh /service-start.sh

# Packages for Git HTTP Backend
RUN apt update && apt install git fcgiwrap spawn-fcgi multiwatch curl -y && apt clean && rm -rf /var/lib/apt/lists/*
Expand All @@ -23,7 +23,7 @@ RUN curl -L https://github.com/wenxuanjun/rindex/releases/download/default/rinde
-o /usr/bin/rindex && chmod +x /usr/bin/rindex

# Set executable permission
RUN chmod +x /start.sh
RUN chmod +x /service-start.sh

EXPOSE 80
CMD ["/start.sh"]
CMD ["/service-start.sh"]
11 changes: 5 additions & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import tseslint from 'typescript-eslint'
import { fixupPluginRules } from '@eslint/compat'
import eslintPluginReact from 'eslint-plugin-react'
import eslintPluginReactHooks from 'eslint-plugin-react-hooks'
import eslintPluginReactCompiler from 'eslint-plugin-react-compiler'

export default [
{
ignores: ['**/dist/*']
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
Expand All @@ -20,8 +22,7 @@ export default [
},
plugins: {
'react': fixupPluginRules(eslintPluginReact),
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
'react-compiler': fixupPluginRules(eslintPluginReactCompiler)
'react-hooks': fixupPluginRules(eslintPluginReactHooks)
},
settings: {
react: {
Expand All @@ -31,7 +32,6 @@ export default [
rules: {
...eslintPluginReact.configs.recommended.rules,
...eslintPluginReactHooks.configs.recommended.rules,
'react-compiler/react-compiler': 'error',

// Best Practices
'no-new': 'error',
Expand Down Expand Up @@ -61,7 +61,7 @@ export default [
'no-unneeded-ternary': 'error',
'no-negated-condition': 'error',
'no-whitespace-before-property': 'error',
'indent': ['error', 2],
'indent': ['error', 2, { SwitchCase: 1 }],
'max-depth': ['error', 4],
'quotes': ['error', 'single'],
'max-len': ['error', { code: 120 }],
Expand Down Expand Up @@ -89,7 +89,6 @@ export default [
'linebreak-style': ['error', 'unix'],
'lines-around-comment': ['error', { beforeBlockComment: true }],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 1 }],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'object-curly-spacing': ['error', 'always'],
'padded-blocks': ['error', 'never'],
'jsx-quotes': ['error', 'prefer-double'],
Expand Down
66 changes: 29 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,43 @@
"preview": "vite preview",
"lint": "eslint",
"lint:fix": "eslint --fix",
"autocorrect": "node src/tools/autocorrect **/*.md --verbose"
"autocorrect": "node src/tools/autocorrect **/*.md --verbose",
"metadata": "node src/tools/metadata -i src/contents/news/*.md -o src/assets/metadata/news.json"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@eslint/compat": "^1.0.1",
"@eslint/js": "^9.3.0",
"@fontsource/roboto": "^5.0.13",
"@honkhonk/vite-plugin-svgr": "^1.1.0",
"@mui/material": "next",
"@mui/styles": "^5.15.18",
"@tanstack/react-query": "^5.37.1",
"@tanstack/react-virtual": "^3.5.0",
"@types/markdown-it": "^14.1.1",
"@types/node": "^20.12.12",
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@vitejs/plugin-react": "^4.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"autocorrect-node": "^2.10.0",
"babel-plugin-react-compiler": "0.0.0-experimental-592953e-20240517",
"clsx": "^2.1.1",
"core-js": "^3.37.1",
"eslint": "^9.3.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-compiler": "0.0.0-experimental-c8b3f72-20240517",
"@eslint/compat": "^1.2.0",
"@eslint/js": "^9.11.1",
"@fontsource/roboto": "^5.1.0",
"@mui/material": "6.1.2",
"@mui/styles": "^6.1.2",
"@tanstack/react-query": "^5.59.0",
"@tanstack/react-virtual": "^3.10.8",
"@types/markdown-it": "^14.1.2",
"@types/node": "^22.7.4",
"@types/react": "18.3.11",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"@vitejs/plugin-react-swc": "^3.7.1",
"autocorrect-node": "^2.11.1",
"eslint": "^9.11.1",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-hooks": "^4.6.2",
"glob": "^10.3.16",
"lefthook": "^1.6.12",
"glob": "^11.0.0",
"lefthook": "^1.7.18",
"markdown-it": "^14.1.0",
"markdown-it-meta": "^0.0.1",
"markdown-it-prism": "^2.3.0",
"mdi-material-ui": "^7.9.1",
"mdi-material-ui": "^7.9.2",
"prismjs": "^1.29.0",
"react": "rc",
"react-dom": "rc",
"react-refresh": "^0.14.2",
"react-router-dom": "^6.23.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-router-dom": "^6.26.2",
"timeago.js": "^4.0.2",
"typeface-roboto": "^1.1.13",
"typescript": "^5.4.5",
"typescript-eslint": "^7.10.0",
"vite": "^5.0.4",
"typescript": "^5.6.2",
"typescript-eslint": "^8.8.0",
"vite": "^5.4.8",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-minify": "^1.5.2",
"vite-plugin-replace": "^0.1.1",
"vite-plugin-minify": "^2.0.0",
"vite-plugin-svgr": "^4.2.0"
}
}
Loading

0 comments on commit 2e95641

Please sign in to comment.