Skip to content

Commit

Permalink
refactor(console): use vite
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Jul 24, 2024
1 parent 98dbead commit 5146e96
Show file tree
Hide file tree
Showing 481 changed files with 2,025 additions and 1,546 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"@types/pg": "^8.6.6",
"husky": "^9.0.0",
"pg": "^8.8.0",
"typescript": "^5.0.0"
"typescript": "^5.0.0",
"vite": "^5.3.4"
},
"engines": {
"node": "^20.9.0",
Expand Down
12 changes: 12 additions & 0 deletions packages/console/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,17 @@ module.exports = {
],
},
},
{
files: ['*.config.js', '*.config.ts', '*.d.ts'],
rules: {
'import/no-unused-modules': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
'import/no-unassigned-import': 'off',
},
},
],
};
19 changes: 0 additions & 19 deletions packages/console/.parcelrc

This file was deleted.

23 changes: 0 additions & 23 deletions packages/console/.parcelrc.arm64

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app"></div>
<script type="module" src="index.tsx"></script>
<script type="module" src="src/index.tsx"></script>
</body>

</html>
43 changes: 13 additions & 30 deletions packages/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"prepack": "pnpm generate",
"generate": "./generate.sh",
"precommit": "lint-staged",
"start": "parcel src/index.html",
"dev": "cross-env PORT=5002 parcel src/index.html --public-url ${CONSOLE_PUBLIC_URL:-/console} --no-cache --hmr-port 6002",
"start": "vite",
"dev": "vite",
"check": "tsc --noEmit",
"build": "pnpm generate && pnpm check && rm -rf dist && parcel build src/index.html --no-autoinstall --no-cache --public-url ${CONSOLE_PUBLIC_URL:-/console}",
"build": "pnpm generate && pnpm check && vite build",
"lint": "eslint --ext .ts --ext .tsx src",
"lint:report": "pnpm lint --format json --output-file report.json",
"stylelint": "stylelint \"src/**/*.scss\"",
Expand All @@ -39,12 +39,8 @@
"@logto/shared": "workspace:^3.1.1",
"@mdx-js/mdx": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@mdx-js/rollup": "^3.0.1",
"@monaco-editor/react": "^4.6.0",
"@parcel/compressor-brotli": "2.9.3",
"@parcel/compressor-gzip": "2.9.3",
"@parcel/core": "2.9.3",
"@parcel/transformer-sass": "2.9.3",
"@parcel/transformer-svg-react": "2.9.3",
"@silverhand/eslint-config": "6.0.1",
"@silverhand/eslint-config-react": "6.0.2",
"@silverhand/essentials": "^2.9.1",
Expand All @@ -63,20 +59,19 @@
"@types/react-helmet": "^6.1.6",
"@types/react-modal": "^3.13.1",
"@types/react-syntax-highlighter": "^15.5.1",
"@vitejs/plugin-react": "^4.3.1",
"@withtyped/client": "^0.8.7",
"buffer": "^6.0.0",
"classnames": "^2.3.1",
"clean-deep": "^3.4.0",
"cross-env": "^7.0.3",
"csstype": "^3.0.11",
"date-fns": "^2.29.3",
"dayjs": "^1.10.5",
"debug": "^4.3.4",
"deep-object-diff": "^1.1.9",
"deepmerge": "^4.2.2",
"dnd-core": "^16.0.0",
"dotenv": "^16.4.5",
"eslint": "^8.56.0",
"history": "^5.3.0",
"find-up": "^7.0.0",
"i18next": "^22.4.15",
"i18next-browser-languagedetector": "^8.0.0",
"identity-obj-proxy": "^3.0.0",
Expand All @@ -92,11 +87,9 @@
"nanoid": "^5.0.1",
"overlayscrollbars": "^2.0.2",
"overlayscrollbars-react": "^0.5.0",
"parcel": "2.9.3",
"postcss": "^8.4.31",
"postcss": "^8.4.39",
"postcss-modules": "^4.3.0",
"prettier": "^3.0.0",
"process": "^0.11.10",
"prop-types": "^15.8.1",
"property-information": "^6.2.0",
"react": "^18.3.1",
Expand All @@ -114,35 +107,25 @@
"react-markdown": "^9.0.0",
"react-modal": "^3.15.1",
"react-paginate": "^8.1.3",
"react-router-dom": "^6.10.0",
"react-router-dom": "^6.25.1",
"react-syntax-highlighter": "^15.5.0",
"react-timer-hook": "^3.0.5",
"recharts": "^2.1.13",
"rehype-mdx-code-props": "^3.0.1",
"remark-gfm": "^4.0.0",
"stylelint": "^15.0.0",
"swr": "^2.2.0",
"ts-node": "^10.9.2",
"tslib": "^2.4.1",
"typescript": "^5.5.3",
"vite": "^5.3.4",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-prebundle": "^0.0.4",
"vite-plugin-svgr": "^4.2.0",
"zod": "^3.23.8",
"zod-to-ts": "^1.2.0"
},
"engines": {
"node": "^20.9.0"
},
"//": "https://github.com/parcel-bundler/parcel/issues/7636",
"targets": {
"default": {
"engines": {
"browsers": "defaults"
}
}
},
"alias": {
"@/*": "./src/$1",
"@cloud/*": "./src/cloud/$1"
},
"stylelint": {
"extends": "@silverhand/eslint-config-react/.stylelintrc"
},
Expand Down
61 changes: 0 additions & 61 deletions packages/console/parcel-transformer-mdx2.js

This file was deleted.

Loading

0 comments on commit 5146e96

Please sign in to comment.