Skip to content

Commit

Permalink
chore: use antd (#67)
Browse files Browse the repository at this point in the history
* chore: update dep

* feat: home

* feat: format

* chore: 组件更新为antd
  • Loading branch information
callqh authored May 22, 2024
1 parent 4972414 commit a42e9d9
Show file tree
Hide file tree
Showing 26 changed files with 5,332 additions and 3,874 deletions.
56 changes: 28 additions & 28 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"useButtonType": "off",
"useKeyWithClickEvents": "off"
},
"correctness": {
"useExhaustiveDependencies": "warn"
}
}
},
"formatter": {
"enabled": true,
"lineWidth": 120,
"indentStyle": "space",
"indentWidth": 2
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
}
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"useButtonType": "off",
"useKeyWithClickEvents": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
}
}
},
"formatter": {
"enabled": true,
"lineWidth": 120,
"indentStyle": "space",
"indentWidth": 2
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
}
}
28 changes: 22 additions & 6 deletions farm.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
import path from 'node:path';
import { vitePluginForArco } from '@arco-plugins/vite-react';
import { defineConfig } from '@farmfe/core';
import less from '@farmfe/js-plugin-less';
import postcss from '@farmfe/js-plugin-postcss';
import { theme } from 'antd';
import Pages from 'vite-plugin-pages';
import { adminInfo } from './global.config';

const { getDesignToken } = theme;

const config = {
token: {
colorPrimary: '#9d4edc',
colorInfo: '#9d4edc',
},
cssVar: {
prefix: 'farm',
},
};

const globalToken = getDesignToken(config);
console.log('🤖 == globalToken:', globalToken);

export default defineConfig({
compilation: {
resolve: {
Expand All @@ -25,6 +40,12 @@ export default defineConfig({
runtime: 'automatic',
},
],
less({
lessOptions: {
modifyVars: globalToken,
},
}),
postcss(),
'farm-plugin-remove-console',
[
'@jstors/farm-plugin-html-template',
Expand All @@ -33,17 +54,12 @@ export default defineConfig({
data: adminInfo,
},
],
less(),
postcss(),
],
vitePlugins: [
Pages({
resolver: 'react',
moduleId: '~react-pages',
importMode: 'async',
}),
vitePluginForArco({
theme: '@arco-themes/react-juzi001',
}),
],
});
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,37 @@
"commitlint": "commitlint --edit"
},
"dependencies": {
"@arco-design/web-react": "^2.61.3",
"@arco-themes/react-juzi001": "^0.0.1",
"@ant-design/icons": "^5.3.7",
"antd": "^5.17.3",
"classnames": "^2.5.1",
"dayjs": "^1.11.10",
"framer-motion": "^11.1.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^6.22.3",
"react-router-dom": "^6.22.3"
"dayjs": "^1.11.11",
"framer-motion": "^11.2.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^6.23.1",
"react-router-dom": "^6.23.1"
},
"devDependencies": {
"@arco-plugins/vite-react": "^1.3.3",
"@biomejs/biome": "1.7.0",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@emotion/is-prop-valid": "^1.2.2",
"@farmfe/cli": "^1.0.2",
"@farmfe/core": "^1.1.8",
"@farmfe/js-plugin-less": "^1.7.0",
"@farmfe/js-plugin-postcss": "^1.6.0",
"@farmfe/plugin-react": "^1.1.0",
"@jstors/farm-plugin-html-template": "^0.0.3",
"@types/react": "^18.2.78",
"@types/react-dom": "^18.2.25",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
"core-js": "^3.36.1",
"farm-plugin-remove-console": "^0.1.2",
"core-js": "^3.37.1",
"farm-plugin-remove-console": "^0.1.6",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"postcss": "^8.4.38",
"react-refresh": "^0.14.0",
"react-refresh": "^0.14.2",
"tailwindcss": "^3.4.3",
"vite-plugin-pages": "^0.32.1"
},
Expand Down
Loading

0 comments on commit a42e9d9

Please sign in to comment.