diff --git a/farm.config.ts b/farm.config.ts index 477cb13..129ebe8 100644 --- a/farm.config.ts +++ b/farm.config.ts @@ -1,5 +1,40 @@ import { defineConfig } from '@farmfe/core'; +import path from 'path'; +import AutoImport from 'unplugin-auto-import/vite' export default defineConfig({ - plugins: ['@farmfe/plugin-react'] + compilation: { + html: { + base: "./src/app.html", + }, + input: { + index: "./src/pages/index.html", + dashboard: "./src/pages/dashboard.html", + "404": "./src/pages/error/404.html", + "500": "./src/pages/error/500.html", + }, + output: { + path: 'build', + filename: 'assets/[name].[hash].[ext]', + assetsFilename: 'static/[resourceName].[ext]' + }, + resolve: { + alias: { + "@/": path.join(process.cwd()), + "$/": path.join(process.cwd(), "src", "lib"), + }, + }, + }, + plugins: [ + '@farmfe/plugin-react', + '@farmfe/plugin-sass', + ], + vitePlugins: [ + AutoImport({ + include: [/\.[jt]sx?$/], + imports: ['react'], + dirs: ['./src/**'], + dts: './src/auto-imports.d.ts' + }), + ], }); diff --git a/package.json b/package.json index 1240aab..366b107 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "co-workingspace", "version": "1.0.0", "scripts": { - "dev": "farm start", "start": "farm start", "build": "farm build", "preview": "farm preview", @@ -16,9 +15,11 @@ "@farmfe/cli": "^1.0.2", "@farmfe/core": "^1.3.0", "@farmfe/plugin-react": "^1.2.0", + "@farmfe/plugin-sass": "^1.1.0", "@types/react": "18", - "core-js": "^3.36.1", "@types/react-dom": "18", - "react-refresh": "^0.14.0" + "core-js": "^3.36.1", + "react-refresh": "^0.14.0", + "unplugin-auto-import": "^0.19.0" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0a754ed..0537c21 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,6 +24,9 @@ importers: '@farmfe/plugin-react': specifier: ^1.2.0 version: 1.2.6 + '@farmfe/plugin-sass': + specifier: ^1.1.0 + version: 1.1.0 '@types/react': specifier: '18' version: 18.3.13 @@ -36,9 +39,15 @@ importers: react-refresh: specifier: ^0.14.0 version: 0.14.2 + unplugin-auto-import: + specifier: ^0.19.0 + version: 0.19.0 packages: + '@antfu/utils@0.7.10': + resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} + '@babel/runtime@7.26.0': resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} @@ -218,6 +227,64 @@ packages: '@farmfe/plugin-react@1.2.6': resolution: {integrity: sha512-AVXMnqwekp+Cke6a16/xWnviUnQiFeY1FhxkTGJVamHQFgGmm+uAhPXJ85sQDQLAwtkAMd8rimEhNFVeHIKkaw==} + '@farmfe/plugin-sass-darwin-arm64@1.1.0': + resolution: {integrity: sha512-KGgBITx/nspD2WT7B+omMuHTcoFySWy2IonRf5Ga9KbmPHwoqxAKMRVa6qXhQ5lc7VvuF4qjTb55iqOCX7b1ug==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@farmfe/plugin-sass-darwin-x64@1.1.0': + resolution: {integrity: sha512-gtdpL+aLjR0VEaXIt3ThWu8jne8Fd3N1y2CVR+LC8OwRTq50sObJi5zlGnpxJVVNYOF2tf53u0GbiuFv2bpGmA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@farmfe/plugin-sass-linux-arm64-gnu@1.1.0': + resolution: {integrity: sha512-JbpscbkOd2k6eFzi8nkhgmmxUPTCroSMjn2O9/X4kvvBB95s4q8N73dqpOIS+zjS35XYlaWrPZz7fvG6V2yumg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@farmfe/plugin-sass-linux-arm64-musl@1.1.0': + resolution: {integrity: sha512-iYZ7QnnOXK3q8KLOoiQxv5OD5AhSXg05Tcezkit3oUghHWLbJI2X+rOUtvQ4cdBdNQm8eU6fUblYdkPaPmWpPA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@farmfe/plugin-sass-linux-x64-gnu@1.1.0': + resolution: {integrity: sha512-KD2dAPwAsZupDBkiyF0LKZmxe31TixPRs+T2Qrj+fZD3h4rNwyApLw7NBtFk2KVCoRl7BOjLKGbRX0U3W7XLMA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@farmfe/plugin-sass-linux-x64-musl@1.1.0': + resolution: {integrity: sha512-bEZxq6MjA/mKCYCXFnfRfomcgur1d80owhFFUHVXhbuUo0mFST0EETfd2z/XUMNtQrgmqNWqMzxnlSVMZsCIUA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@farmfe/plugin-sass-win32-arm64-msvc@1.1.0': + resolution: {integrity: sha512-SL+YVEZG5PHWpL4hvB3jML4UBQuATh8HnmKA/kNIh1TxQAtU9g/7Tx+8P5E8873BdJzRN0Pvcr96sZT7KtQcpQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@farmfe/plugin-sass-win32-ia32-msvc@1.1.0': + resolution: {integrity: sha512-5y3I27JeKq4NuI5IFEa68GJlzlhoD6nLClU02DmYRYx9+EFh98SlxWnR+XXgpruHnTw8Lw3iwOwOukLGC4zWJg==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@farmfe/plugin-sass-win32-x64-msvc@1.1.0': + resolution: {integrity: sha512-t6uWAeL20W+hFjG4B1851HUm6ygtD2KJDJ8rLQhXYqZ3z3ctR72lUhsp89cWHXfAPy0oVG3Cwk6gopIrg3RypQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@farmfe/plugin-sass@1.1.0': + resolution: {integrity: sha512-SJYqe9Qomn+xTfEKOsOi8YjDcDxbtSYBJK5xsBfWT8G6EIPcbzTcMPeK4GfJhQ/P/BSCZ3w7/yH+S/ev+0vlxg==} + engines: {node: '>=16'} + '@farmfe/runtime-plugin-hmr@3.5.9': resolution: {integrity: sha512-odXeRDdSf5xpW9edm2C5xziIdhsaoWjibIFiA2WJS9cdQmmE/ndqNV8bYpf4I7Ke4wiWS2f9kLKyZMigD6HiVQ==} @@ -233,6 +300,9 @@ packages: '@farmfe/utils@0.1.0': resolution: {integrity: sha512-neNJQGqV7XL4XifG1uHOBFSFLy2yx1/DVZNRA7nfeEAXEksVZTwWA+fZrYEaI0w7Sw6K/9NYn9Jgpn+NAT0mcg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@koa/cors@5.0.0': resolution: {integrity: sha512-x/iUDjcS90W69PryLDIMgFyV21YLTnG9zOpPXS7Bkt2b8AsY3zZsIpOLBkYr9fBcF3HbkKaER5hOBZLfpLgYNw==} engines: {node: '>= 14.0.0'} @@ -262,9 +332,21 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/http-proxy@1.17.15': resolution: {integrity: sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==} @@ -296,6 +378,11 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -430,6 +517,9 @@ packages: resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} engines: {node: '>= 0.6'} + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -567,6 +657,12 @@ packages: engines: {node: '>=4'} hasBin: true + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -881,6 +977,9 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -924,6 +1023,10 @@ packages: resolution: {integrity: sha512-j/8tY9j5t+GVMLeioLaxweJiKUayFhlGqNTzf2ZGwL0ZCQijd2RLHK0SLW5Tsko8YyyqCZC2cojIb0/s62qTAg==} engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4} + local-pkg@0.5.1: + resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==} + engines: {node: '>=14'} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -949,6 +1052,9 @@ packages: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} @@ -984,6 +1090,9 @@ packages: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} + mlly@1.7.3: + resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -1095,6 +1204,9 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -1102,10 +1214,17 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + pkg-types@1.2.1: + resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} + prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -1181,9 +1300,54 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + sass-embedded-darwin-arm64@1.62.0: + resolution: {integrity: sha512-bYEM6DY7kteOd/aJXUisiavm8B1acRhpIn+rhzKZeTn87kUW5RzZv2nKaSmb1vUd4ZptDGaJ144qz/d20rnogQ==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [darwin] + + sass-embedded-darwin-x64@1.62.0: + resolution: {integrity: sha512-2sBQ4uWjZbf8TKXF8Aq7N0p5V2tKUr4zX9gQAiKvm1NBYwsW22+m8D34heOWu50ikpIxebvt7i/z7hafH5kzKg==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [darwin] + + sass-embedded-linux-arm64@1.62.0: + resolution: {integrity: sha512-FexUt8aE7I7fJub3N6+NsDdbPRP/O8o400qpbEbY7BWgiWEdpr81OBulQZY/2LzZUnz9keUhfpmltNY3SNg3kg==} + engines: {node: '>=14.0.0'} + cpu: [arm64] + os: [linux] + + sass-embedded-linux-ia32@1.62.0: + resolution: {integrity: sha512-VpDHtMIwcoWqDsiskjhDYAle0SJV4mUiZJTXg5RkMzoX1ZyNiVz+uNaZ88kDqcGXsWpe2i0sIlljD4ryaiMAhA==} + engines: {node: '>=14.0.0'} + cpu: [ia32] + os: [linux] + + sass-embedded-linux-x64@1.62.0: + resolution: {integrity: sha512-dntYMsu0QonlerFB8VDlzxoJcpMEtN9lPHstKOQ6rk6hbSFPvcI8MqqUomlOjmpakKeVrpyZ04nm9jHrzlFmYg==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [linux] + + sass-embedded-win32-ia32@1.62.0: + resolution: {integrity: sha512-rTCZCVkQa6XcreyQ8gYqnsEG13HCzqKoN2mCvIuGwJro8IjyT2PzWauouO0M06T0FLH0pc3EvKdKaLdtijf9AQ==} + engines: {node: '>=14.0.0'} + cpu: [ia32] + os: [win32] + + sass-embedded-win32-x64@1.62.0: + resolution: {integrity: sha512-g6DZBPGfIDKLBarvYRVKJ+7rJAHJXkOQQVrYSWm22klA9ZNZ0CaVyqLqejttZPKGreD8h/xh2uz/s6w/P900Sw==} + engines: {node: '>=14.0.0'} + cpu: [x64] + os: [win32] + scheduler@0.23.2: resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + scule@1.3.0: + resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==} + semver@7.6.3: resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} @@ -1251,6 +1415,9 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + strip-literal@2.1.1: + resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -1294,9 +1461,15 @@ packages: resolution: {integrity: sha512-k24RCVWlEcjkdOxYmVJgeD/0a1TiSpqLg+ZalVGV9lsnr4yqu0w7tX/x2xX6G4zpkgQnRf89lxuZ1wsbjXM8lw==} hasBin: true + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + unimport@3.14.5: + resolution: {integrity: sha512-tn890SwFFZxqaJSKQPPd+yygfKSATbM8BZWW1aCR2TJBTs1SDrmLamBueaFtYsGjHtQaRgqEbQflOjN2iW12gA==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -1305,6 +1478,26 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} + unplugin-auto-import@0.19.0: + resolution: {integrity: sha512-W97gTDEWu/L1EcKCXY5Ni8bsMW1E9kv12wYQv3mYpd7zcFctXYlLKsqeva6sbCQbzS8t9AG/XdU5/WkEJKPlFw==} + engines: {node: '>=14'} + peerDependencies: + '@nuxt/kit': ^3.2.2 + '@vueuse/core': '*' + peerDependenciesMeta: + '@nuxt/kit': + optional: true + '@vueuse/core': + optional: true + + unplugin@1.16.0: + resolution: {integrity: sha512-5liCNPuJW8dqh3+DM6uNM2EI3MLLpCKp/KY+9pB5M2S2SR2qvvDHhKgBOaTWEbZTAws3CXfB0rKTIolWKL05VQ==} + engines: {node: '>=14.0.0'} + + unplugin@2.1.0: + resolution: {integrity: sha512-us4j03/499KhbGP8BU7Hrzrgseo+KdfJYWcbcajCOqsAyb8Gk0Yn2kiUIcZISYCb1JFaZfIuG3b42HmguVOKCQ==} + engines: {node: '>=18.12.0'} + untildify@4.0.0: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} engines: {node: '>=8'} @@ -1329,6 +1522,9 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -1365,6 +1561,8 @@ packages: snapshots: + '@antfu/utils@0.7.10': {} + '@babel/runtime@7.26.0': dependencies: regenerator-runtime: 0.14.1 @@ -1628,6 +1826,52 @@ snapshots: '@farmfe/plugin-react-win32-ia32-msvc': 1.2.6 '@farmfe/plugin-react-win32-x64-msvc': 1.2.6 + '@farmfe/plugin-sass-darwin-arm64@1.1.0': + optional: true + + '@farmfe/plugin-sass-darwin-x64@1.1.0': + optional: true + + '@farmfe/plugin-sass-linux-arm64-gnu@1.1.0': + optional: true + + '@farmfe/plugin-sass-linux-arm64-musl@1.1.0': + optional: true + + '@farmfe/plugin-sass-linux-x64-gnu@1.1.0': + optional: true + + '@farmfe/plugin-sass-linux-x64-musl@1.1.0': + optional: true + + '@farmfe/plugin-sass-win32-arm64-msvc@1.1.0': + optional: true + + '@farmfe/plugin-sass-win32-ia32-msvc@1.1.0': + optional: true + + '@farmfe/plugin-sass-win32-x64-msvc@1.1.0': + optional: true + + '@farmfe/plugin-sass@1.1.0': + optionalDependencies: + '@farmfe/plugin-sass-darwin-arm64': 1.1.0 + '@farmfe/plugin-sass-darwin-x64': 1.1.0 + '@farmfe/plugin-sass-linux-arm64-gnu': 1.1.0 + '@farmfe/plugin-sass-linux-arm64-musl': 1.1.0 + '@farmfe/plugin-sass-linux-x64-gnu': 1.1.0 + '@farmfe/plugin-sass-linux-x64-musl': 1.1.0 + '@farmfe/plugin-sass-win32-arm64-msvc': 1.1.0 + '@farmfe/plugin-sass-win32-ia32-msvc': 1.1.0 + '@farmfe/plugin-sass-win32-x64-msvc': 1.1.0 + sass-embedded-darwin-arm64: 1.62.0 + sass-embedded-darwin-x64: 1.62.0 + sass-embedded-linux-arm64: 1.62.0 + sass-embedded-linux-ia32: 1.62.0 + sass-embedded-linux-x64: 1.62.0 + sass-embedded-win32-ia32: 1.62.0 + sass-embedded-win32-x64: 1.62.0 + '@farmfe/runtime-plugin-hmr@3.5.9': dependencies: core-js: 3.39.0 @@ -1644,6 +1888,8 @@ snapshots: '@farmfe/utils@0.1.0': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@koa/cors@5.0.0': dependencies: vary: 1.1.2 @@ -1682,10 +1928,18 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@rollup/pluginutils@5.1.4': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + '@swc/helpers@0.5.15': dependencies: tslib: 2.8.1 + '@types/estree@1.0.6': {} + '@types/http-proxy@1.17.15': dependencies: '@types/node': 22.10.1 @@ -1718,6 +1972,8 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 + acorn@8.14.0: {} + ansi-colors@4.1.3: {} ansi-escapes@4.3.2: @@ -1845,6 +2101,8 @@ snapshots: dependencies: mime-db: 1.53.0 + confbox@0.1.8: {} + content-disposition@0.5.4: dependencies: safe-buffer: 5.2.1 @@ -1949,6 +2207,12 @@ snapshots: esprima@4.0.1: {} + estree-walker@2.0.2: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.6 + eventemitter3@4.0.7: {} execa@5.1.1: @@ -2270,6 +2534,8 @@ snapshots: js-tokens@4.0.0: {} + js-tokens@9.0.1: {} + js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -2350,6 +2616,11 @@ snapshots: transitivePeerDependencies: - supports-color + local-pkg@0.5.1: + dependencies: + mlly: 1.7.3 + pkg-types: 1.2.1 + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -2371,6 +2642,10 @@ snapshots: dependencies: js-tokens: 4.0.0 + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + media-typer@0.3.0: {} merge-stream@2.0.0: {} @@ -2394,6 +2669,13 @@ snapshots: mimic-fn@4.0.0: {} + mlly@1.7.3: + dependencies: + acorn: 8.14.0 + pathe: 1.1.2 + pkg-types: 1.2.1 + ufo: 1.5.4 + mri@1.2.0: {} ms@2.1.3: {} @@ -2483,12 +2765,22 @@ snapshots: path-type@4.0.0: {} + pathe@1.1.2: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} + picomatch@4.0.2: {} + pify@4.0.1: {} + pkg-types@1.2.1: + dependencies: + confbox: 0.1.8 + mlly: 1.7.3 + pathe: 1.1.2 + prettier@2.8.8: {} queue-microtask@1.2.3: {} @@ -2558,10 +2850,33 @@ snapshots: safer-buffer@2.1.2: {} + sass-embedded-darwin-arm64@1.62.0: + optional: true + + sass-embedded-darwin-x64@1.62.0: + optional: true + + sass-embedded-linux-arm64@1.62.0: + optional: true + + sass-embedded-linux-ia32@1.62.0: + optional: true + + sass-embedded-linux-x64@1.62.0: + optional: true + + sass-embedded-win32-ia32@1.62.0: + optional: true + + sass-embedded-win32-x64@1.62.0: + optional: true + scheduler@0.23.2: dependencies: loose-envify: 1.4.0 + scule@1.3.0: {} + semver@7.6.3: {} set-function-length@1.2.2: @@ -2618,6 +2933,10 @@ snapshots: strip-final-newline@3.0.0: {} + strip-literal@2.1.1: + dependencies: + js-tokens: 9.0.1 + supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -2649,12 +2968,55 @@ snapshots: ua-parser-js@1.0.39: {} + ufo@1.5.4: {} + undici-types@6.20.0: {} + unimport@3.14.5: + dependencies: + '@rollup/pluginutils': 5.1.4 + acorn: 8.14.0 + escape-string-regexp: 5.0.0 + estree-walker: 3.0.3 + fast-glob: 3.3.2 + local-pkg: 0.5.1 + magic-string: 0.30.17 + mlly: 1.7.3 + pathe: 1.1.2 + picomatch: 4.0.2 + pkg-types: 1.2.1 + scule: 1.3.0 + strip-literal: 2.1.1 + unplugin: 1.16.0 + transitivePeerDependencies: + - rollup + universalify@0.1.2: {} universalify@2.0.1: {} + unplugin-auto-import@0.19.0: + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.1.4 + local-pkg: 0.5.1 + magic-string: 0.30.17 + picomatch: 4.0.2 + unimport: 3.14.5 + unplugin: 2.1.0 + transitivePeerDependencies: + - rollup + + unplugin@1.16.0: + dependencies: + acorn: 8.14.0 + webpack-virtual-modules: 0.6.2 + + unplugin@2.1.0: + dependencies: + acorn: 8.14.0 + webpack-virtual-modules: 0.6.2 + untildify@4.0.0: {} update-browserslist-db@1.1.1(browserslist@4.24.2): @@ -2673,6 +3035,8 @@ snapshots: dependencies: defaults: 1.0.4 + webpack-virtual-modules@0.6.2: {} + which@2.0.2: dependencies: isexe: 2.0.0 diff --git a/public/favicon.ico b/public/favicon.ico index 80465de..91a0264 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/index.html b/src/app.html similarity index 72% rename from index.html rename to src/app.html index 56d5a1b..4400042 100644 --- a/index.html +++ b/src/app.html @@ -1,14 +1,15 @@ - + - Farm + React + TS + CoWorkingSpace +
- + {{children}} \ No newline at end of file diff --git a/src/app.scss b/src/app.scss new file mode 100644 index 0000000..87bde26 --- /dev/null +++ b/src/app.scss @@ -0,0 +1,22 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #212121; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } +} diff --git a/src/app.tsx b/src/app.tsx new file mode 100644 index 0000000..20129d0 --- /dev/null +++ b/src/app.tsx @@ -0,0 +1,2 @@ +import '$/destyle.css'; +import './app.scss'; \ No newline at end of file diff --git a/src/assets/logo.png b/src/assets/logo.png deleted file mode 100644 index 0caeb43..0000000 Binary files a/src/assets/logo.png and /dev/null differ diff --git a/src/assets/react.svg b/src/assets/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts new file mode 100644 index 0000000..931d4f3 --- /dev/null +++ b/src/auto-imports.d.ts @@ -0,0 +1,30 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +// biome-ignore lint: disable +export {} +declare global { + const Main: typeof import('./pages/index')['Main'] + const createRef: typeof import('react')['createRef'] + const forwardRef: typeof import('react')['forwardRef'] + const lazy: typeof import('react')['lazy'] + const memo: typeof import('react')['memo'] + const startTransition: typeof import('react')['startTransition'] + const useCallback: typeof import('react')['useCallback'] + const useContext: typeof import('react')['useContext'] + const useDebugValue: typeof import('react')['useDebugValue'] + const useDeferredValue: typeof import('react')['useDeferredValue'] + const useEffect: typeof import('react')['useEffect'] + const useId: typeof import('react')['useId'] + const useImperativeHandle: typeof import('react')['useImperativeHandle'] + const useInsertionEffect: typeof import('react')['useInsertionEffect'] + const useLayoutEffect: typeof import('react')['useLayoutEffect'] + const useMemo: typeof import('react')['useMemo'] + const useReducer: typeof import('react')['useReducer'] + const useRef: typeof import('react')['useRef'] + const useState: typeof import('react')['useState'] + const useSyncExternalStore: typeof import('react')['useSyncExternalStore'] + const useTransition: typeof import('react')['useTransition'] +} diff --git a/src/index.css b/src/index.css deleted file mode 100644 index 6cc4daf..0000000 --- a/src/index.css +++ /dev/null @@ -1,69 +0,0 @@ -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; -} - -a { - font-weight: 500; - color: #9f1a8f; - text-decoration: inherit; -} -a:hover { - color: #9f1a8f; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #9f1a8f; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #9F1A8F; - } - button { - background-color: #f9f9f9; - } -} diff --git a/src/index.tsx b/src/index.tsx deleted file mode 100644 index e68d8bb..0000000 --- a/src/index.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import { Main } from './main'; -import './index.css' - - -const container = document.querySelector('#root')!; -const root = createRoot(container); - -root.render(
); diff --git a/src/lib/destyle.css b/src/lib/destyle.css new file mode 100644 index 0000000..904c10c --- /dev/null +++ b/src/lib/destyle.css @@ -0,0 +1,2 @@ +/*! destyle.css v4.0.1 | MIT License | https://github.com/nicolas-cusan/destyle.min.css */ +*,::before,::after{box-sizing:border-box;border-style:solid;border-width:0;min-width:0}html{line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}body{margin:0}main{display:block}p,table,blockquote,address,pre,iframe,form,figure,dl{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}ul,ol{margin:0;padding:0;list-style:none}dt{font-weight:700}dd{margin-left:0}hr{box-sizing:content-box;height:0;overflow:visible;border-top-width:1px;margin:0;clear:both;color:inherit}pre{font-family:monospace,monospace;font-size:inherit}address{font-style:inherit}a{background-color:transparent;text-decoration:none;color:inherit}abbr[title]{text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:inherit}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}svg,img,embed,object,iframe{vertical-align:bottom}button,input,optgroup,select,textarea{-webkit-appearance:none;appearance:none;vertical-align:middle;color:inherit;font:inherit;background:transparent;padding:0;margin:0;border-radius:0;text-align:inherit;text-transform:inherit}button,[type="button"],[type="reset"],[type="submit"]{cursor:pointer}button:disabled,[type="button"]:disabled,[type="reset"]:disabled,[type="submit"]:disabled{cursor:default}:-moz-focusring{outline:auto}select:disabled{opacity:inherit}option{padding:0}fieldset{margin:0;padding:0;min-width:0}legend{padding:0}progress{vertical-align:baseline}textarea{overflow:auto}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}[type="number"]{-moz-appearance:textfield}label[for]{cursor:pointer}details{display:block}summary{display:list-item}[contenteditable]:focus{outline:auto}table{border-color:inherit;border-collapse:collapse}caption{text-align:left}td,th{vertical-align:top;padding:0}th{text-align:left;font-weight:700} \ No newline at end of file diff --git a/src/main.css b/src/main.css deleted file mode 100644 index ff29d41..0000000 --- a/src/main.css +++ /dev/null @@ -1,42 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #9F1A8Faa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/src/main.tsx b/src/main.tsx deleted file mode 100644 index f91fd53..0000000 --- a/src/main.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React, { useState } from "react"; -import "./main.css"; -import reactLogo from "./assets/react.svg"; -import FarmLogo from "./assets/logo.png"; -export function Main() { - const [count, setCount] = useState(0); - - return ( - <> -
- - Farm logo - - - React logo - -
-

Farm + Reaact

-
- -

- Edit src/main.tsx and save to test HMR -

-
-

- Click on the Farm and React logos to learn more -

- - ); -} diff --git a/src/pages/dashboard.html b/src/pages/dashboard.html new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/error/404.html b/src/pages/error/404.html new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/error/500.html b/src/pages/error/500.html new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/index.html b/src/pages/index.html new file mode 100644 index 0000000..35faa64 --- /dev/null +++ b/src/pages/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/pages/index.scss b/src/pages/index.scss new file mode 100644 index 0000000..e047d03 --- /dev/null +++ b/src/pages/index.scss @@ -0,0 +1,19 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +h1 { + font-size: 2rem; +} + +button { + background-color: #434343; + color: white; + padding: 0.2rem 0.7rem; + border: none; + border-radius: 0.25rem; + cursor: pointer; +} \ No newline at end of file diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..de35d72 --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,24 @@ + +import { createRoot } from 'react-dom/client'; + +const container = document.querySelector('#root')!; +const root = createRoot(container); + +import './index.scss'; + +export function Main() { + const [count, setCount] = useState(0); + + return ( + <> +

Hello!

+
+ +
+ + ); +} + +root.render(
); \ No newline at end of file