feat: add unplugin-auto-imports

This commit is contained in:
Nex Zhu 2021-12-27 19:07:17 +08:00
parent 3fa72dc0fc
commit 545ef5b0dd
No known key found for this signature in database
GPG Key ID: 15C6254AD19362B4
6 changed files with 570 additions and 6 deletions

View File

@ -5,6 +5,7 @@ module.exports = {
project: 'tsconfig.json', project: 'tsconfig.json',
}, },
rules: { rules: {
'no-undef': 'off', // Turn off for `unplugin-auto-import`
'vue/multi-word-component-names': 'off', 'vue/multi-word-component-names': 'off',
}, },
overrides: [ overrides: [

18
.fes.js
View File

@ -1,6 +1,7 @@
// .fes.js 只负责管理编译时配置只能使用plain Object // .fes.js 只负责管理编译时配置只能使用plain Object
import ESLintPlugin from 'eslint-webpack-plugin' import ESLintPlugin from 'eslint-webpack-plugin'
import StylelintPlugin from 'stylelint-webpack-plugin' import StylelintPlugin from 'stylelint-webpack-plugin'
import AutoImportPlugin from 'unplugin-auto-import/webpack'
export default { export default {
publicPath: './', publicPath: './',
@ -43,5 +44,22 @@ export default {
extensions: ['css', 'scss', 'vue', 'tsx'], extensions: ['css', 'scss', 'vue', 'tsx'],
}, },
]) ])
config.plugin('auto-import').use(
AutoImportPlugin({
dts: './src/types/auto-imports.d.ts',
include: [
/src\/.+\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
/src\/.+\.vue$/,
/src\/.+\.vue\?vue/, // .vue
/src\/.+\.md$/, // .md
],
// global imports to register
imports: [
// presets
'vue',
'vue-router',
],
}),
)
}, },
} }

496
package-lock.json generated
View File

@ -22,6 +22,7 @@
"@daotl/prettier-config": "^0.1.2", "@daotl/prettier-config": "^0.1.2",
"@daotl/tsconfig": "^0.0.4", "@daotl/tsconfig": "^0.0.4",
"@fesjs/plugin-sass": "^2.0.0", "@fesjs/plugin-sass": "^2.0.0",
"@fesjs/plugin-windicss": "^2.0.4",
"@vue/compiler-sfc": "^3.2.26", "@vue/compiler-sfc": "^3.2.26",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint-webpack-plugin": "^3.1.1", "eslint-webpack-plugin": "^3.1.1",
@ -33,7 +34,8 @@
"stylelint-config-recommended-scss": "^5.0.2", "stylelint-config-recommended-scss": "^5.0.2",
"stylelint-config-recommended-vue": "^1.1.0", "stylelint-config-recommended-vue": "^1.1.0",
"stylelint-webpack-plugin": "^3.1.0", "stylelint-webpack-plugin": "^3.1.0",
"typescript": "^4.5.4" "typescript": "^4.5.4",
"unplugin-auto-import": "^0.5.5"
} }
}, },
"node_modules/@ant-design/colors": { "node_modules/@ant-design/colors": {
@ -64,6 +66,18 @@
"version": "4.14.169", "version": "4.14.169",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@antfu/utils": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.3.0.tgz",
"integrity": "sha512-UU8TLr/EoXdg7OjMp0h9oDoIAVr+Z/oW9cpOxQQyrsz6Qzd2ms/1CdWx8fl2OQdFpxGmq5Vc4TwfLHId6nAZjA==",
"dev": true,
"dependencies": {
"@types/throttle-debounce": "^2.1.0"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
"version": "7.16.0", "version": "7.16.0",
"license": "MIT", "license": "MIT",
@ -1896,6 +1910,34 @@
"@fesjs/fes": "^2.0.0" "@fesjs/fes": "^2.0.0"
} }
}, },
"node_modules/@fesjs/plugin-windicss": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@fesjs/plugin-windicss/-/plugin-windicss-2.0.4.tgz",
"integrity": "sha512-Dxb/Sa1t48QmWeOBqtwySc79JhrDfhIj4k+IoVz5fbV8WW71Ab4sSAhmmm/d03wW/vtW920RJ9HUNcDtF6/jsg==",
"dev": true,
"dependencies": {
"qs": "^6.10.2",
"windicss-webpack-plugin": "^1.6.0"
},
"peerDependencies": {
"vue": "^3.0.5"
}
},
"node_modules/@fesjs/plugin-windicss/node_modules/qs": {
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.2.tgz",
"integrity": "sha512-mSIdjzqznWgfd4pMii7sHtaYF8rx8861hBO80SraY5GT0XQibWZWJSid0avzHGkDIZLImux2S5mXO0Hfct2QCw==",
"dev": true,
"dependencies": {
"side-channel": "^1.0.4"
},
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/@fesjs/preset-built-in": { "node_modules/@fesjs/preset-built-in": {
"version": "2.0.10", "version": "2.0.10",
"resolved": "https://registry.npmjs.org/@fesjs/preset-built-in/-/preset-built-in-2.0.10.tgz", "resolved": "https://registry.npmjs.org/@fesjs/preset-built-in/-/preset-built-in-2.0.10.tgz",
@ -2173,6 +2215,19 @@
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
"integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==" "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g=="
}, },
"node_modules/@rollup/pluginutils": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz",
"integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==",
"dev": true,
"dependencies": {
"estree-walker": "^2.0.1",
"picomatch": "^2.2.2"
},
"engines": {
"node": ">= 8.0.0"
}
},
"node_modules/@sideway/address": { "node_modules/@sideway/address": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz",
@ -2391,6 +2446,12 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/@types/throttle-debounce": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz",
"integrity": "sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==",
"dev": true
},
"node_modules/@typescript-eslint/eslint-plugin": { "node_modules/@typescript-eslint/eslint-plugin": {
"version": "5.8.0", "version": "5.8.0",
"dev": true, "dev": true,
@ -2833,6 +2894,38 @@
"@xtuc/long": "4.2.2" "@xtuc/long": "4.2.2"
} }
}, },
"node_modules/@windicss/config": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/@windicss/config/-/config-1.6.1.tgz",
"integrity": "sha512-E4FKtWdYl5HwFknBQ+Z2JIF58TZiR4/ZiP8B30sfRxNlG6clh4agn5MJqTb4ER0MLkDb30Hugl2tGun0AQNbFw==",
"dev": true,
"dependencies": {
"debug": "^4.3.3",
"jiti": "^1.12.9",
"windicss": "^3.4.0"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@windicss/plugin-utils": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-1.6.1.tgz",
"integrity": "sha512-hFQY27bOr9SSpekIvSwBpIX25nR4cwrU5/1kJFqCwAzqyazvd7U9c/iI1E2sTEQOkPbpTTJkY2Act21Q70oSDQ==",
"dev": true,
"dependencies": {
"@antfu/utils": "^0.3.0",
"@windicss/config": "1.6.1",
"debug": "^4.3.3",
"fast-glob": "^3.2.7",
"magic-string": "^0.25.7",
"micromatch": "^4.0.4",
"windicss": "^3.4.0"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@xtuc/ieee754": { "node_modules/@xtuc/ieee754": {
"version": "1.2.0", "version": "1.2.0",
"license": "BSD-3-Clause" "license": "BSD-3-Clause"
@ -3598,6 +3691,30 @@
"resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz",
"integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g=="
}, },
"node_modules/builtins": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/builtins/-/builtins-4.0.0.tgz",
"integrity": "sha512-qC0E2Dxgou1IHhvJSLwGDSTvokbRovU5zZFuDY6oY8Y2lF3nGt5Ad8YZK7GMtqzY84Wu7pXTPeHQeHcXSXsRhw==",
"dev": true,
"dependencies": {
"semver": "^7.0.0"
}
},
"node_modules/builtins/node_modules/semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
},
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/bytes": { "node_modules/bytes": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz",
@ -7288,6 +7405,19 @@
"node": ">=4" "node": ">=4"
} }
}, },
"node_modules/import-meta-resolve": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-1.1.1.tgz",
"integrity": "sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A==",
"dev": true,
"dependencies": {
"builtins": "^4.0.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/imurmurhash": { "node_modules/imurmurhash": {
"version": "0.1.4", "version": "0.1.4",
"dev": true, "dev": true,
@ -7665,6 +7795,15 @@
"url": "https://github.com/chalk/supports-color?sponsor=1" "url": "https://github.com/chalk/supports-color?sponsor=1"
} }
}, },
"node_modules/jiti": {
"version": "1.12.9",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.12.9.tgz",
"integrity": "sha512-TdcJywkQtcwLxogc4rSMAi479G2eDPzfW0fLySks7TPhgZZ4s/tM6stnzayIh3gS/db3zExWJyUx4cNWrwAmoQ==",
"dev": true,
"bin": {
"jiti": "bin/jiti.js"
}
},
"node_modules/jju": { "node_modules/jju": {
"version": "1.4.0", "version": "1.4.0",
"dev": true, "dev": true,
@ -8150,6 +8289,21 @@
"json5": "lib/cli.js" "json5": "lib/cli.js"
} }
}, },
"node_modules/local-pkg": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.0.tgz",
"integrity": "sha512-2XBWjO/v63JeR1HPzLJxdTVRQDB84Av2p2KtBA5ahvpyLUPubcAU6iXlAJrONcY7aSqgJhXxElAnKtnYsRolPQ==",
"dev": true,
"dependencies": {
"mlly": "^0.2.2"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/locate-path": { "node_modules/locate-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
@ -8637,6 +8791,15 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/mlly": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/mlly/-/mlly-0.2.10.tgz",
"integrity": "sha512-xfyW6c2QBGArtctzNnTV5leOKX8nOMz2simeubtXofdsdSJFSNw+Ncvrs8kxcN3pBrQLXuYBHNFV6NgZ5Ryf4A==",
"dev": true,
"dependencies": {
"import-meta-resolve": "^1.1.1"
}
},
"node_modules/mockjs": { "node_modules/mockjs": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/mockjs/-/mockjs-1.1.0.tgz", "resolved": "https://registry.npmjs.org/mockjs/-/mockjs-1.1.0.tgz",
@ -11170,6 +11333,20 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/signal-exit": { "node_modules/signal-exit": {
"version": "3.0.6", "version": "3.0.6",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
@ -12631,6 +12808,59 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/unplugin": {
"version": "0.2.21",
"resolved": "https://registry.npmjs.org/unplugin/-/unplugin-0.2.21.tgz",
"integrity": "sha512-IJ15/L5XbhnV7J09Zjk0FT5HEkBjkXucWAXQWRsmEtUxmmxwh23yavrmDbCF6ZPxWiVB28+wnKIHePTRRpQPbQ==",
"dev": true,
"dependencies": {
"webpack-virtual-modules": "^0.4.3"
},
"peerDependencies": {
"rollup": "^2.50.0",
"vite": "^2.3.0",
"webpack": "4 || 5"
},
"peerDependenciesMeta": {
"rollup": {
"optional": true
},
"vite": {
"optional": true
},
"webpack": {
"optional": true
}
}
},
"node_modules/unplugin-auto-import": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/unplugin-auto-import/-/unplugin-auto-import-0.5.5.tgz",
"integrity": "sha512-PAP/6WdqWtGhlQBvlVZ7qmhHbLcTYSsARtFSbY/jaUx/SaQkRT7SvronHIKEvx4bPmS+l4erQ9gQKSBBPzvUnQ==",
"dev": true,
"dependencies": {
"@antfu/utils": "^0.3.0",
"@rollup/pluginutils": "^4.1.2",
"local-pkg": "^0.4.0",
"magic-string": "^0.25.7",
"resolve": "^1.20.0",
"unplugin": "^0.2.21"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vueuse/core": "*"
},
"peerDependenciesMeta": {
"@vueuse/core": {
"optional": true
}
}
},
"node_modules/unset-value": { "node_modules/unset-value": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
@ -13777,6 +14007,12 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/webpack-virtual-modules": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.4.3.tgz",
"integrity": "sha512-5NUqC2JquIL2pBAAo/VfBP6KuGkHIZQXW/lNKupLPfhViwh8wNsu0BObtl09yuKZszeEUfbXz8xhrHvSG16Nqw==",
"dev": true
},
"node_modules/webpack/node_modules/acorn-import-assertions": { "node_modules/webpack/node_modules/acorn-import-assertions": {
"version": "1.8.0", "version": "1.8.0",
"license": "MIT", "license": "MIT",
@ -13928,6 +14164,58 @@
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
}, },
"node_modules/windicss": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/windicss/-/windicss-3.4.0.tgz",
"integrity": "sha512-X+9Y1/FPxX253Xo4Hk/qfVuvoAxgKx686Z6yHxmBFMH7wRCPdRO42na9k/yEnrW6EqCFJP/GcMIHn3QENaE42g==",
"dev": true,
"bin": {
"windicss": "cli/index.js"
},
"engines": {
"node": ">= 12"
}
},
"node_modules/windicss-webpack-plugin": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/windicss-webpack-plugin/-/windicss-webpack-plugin-1.6.2.tgz",
"integrity": "sha512-1NhvBVmClIgxnC6C50RlqdpL9klF4g1JwJAoDNCdY0fO6o5GP6hO+E3xGCWI38l4Ij36JQZ4/CxFKWjdixXFBQ==",
"dev": true,
"dependencies": {
"@windicss/plugin-utils": "^1.6.1",
"debug": "^4.3.3",
"loader-utils": "^2.0.0",
"lodash": "^4.17.21",
"magic-string": "^0.25.7",
"upath": "^2.0.1",
"webpack-virtual-modules": "^0.4.3",
"windicss": "^3.4.0"
}
},
"node_modules/windicss-webpack-plugin/node_modules/loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
},
"engines": {
"node": ">=8.9.0"
}
},
"node_modules/windicss-webpack-plugin/node_modules/upath": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz",
"integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==",
"dev": true,
"engines": {
"node": ">=4",
"yarn": "*"
}
},
"node_modules/word-wrap": { "node_modules/word-wrap": {
"version": "1.2.3", "version": "1.2.3",
"dev": true, "dev": true,
@ -14098,6 +14386,15 @@
} }
} }
}, },
"@antfu/utils": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.3.0.tgz",
"integrity": "sha512-UU8TLr/EoXdg7OjMp0h9oDoIAVr+Z/oW9cpOxQQyrsz6Qzd2ms/1CdWx8fl2OQdFpxGmq5Vc4TwfLHId6nAZjA==",
"dev": true,
"requires": {
"@types/throttle-debounce": "^2.1.0"
}
},
"@babel/code-frame": { "@babel/code-frame": {
"version": "7.16.0", "version": "7.16.0",
"requires": { "requires": {
@ -15310,6 +15607,27 @@
"sass-loader": "^11.0.1" "sass-loader": "^11.0.1"
} }
}, },
"@fesjs/plugin-windicss": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@fesjs/plugin-windicss/-/plugin-windicss-2.0.4.tgz",
"integrity": "sha512-Dxb/Sa1t48QmWeOBqtwySc79JhrDfhIj4k+IoVz5fbV8WW71Ab4sSAhmmm/d03wW/vtW920RJ9HUNcDtF6/jsg==",
"dev": true,
"requires": {
"qs": "^6.10.2",
"windicss-webpack-plugin": "^1.6.0"
},
"dependencies": {
"qs": {
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.2.tgz",
"integrity": "sha512-mSIdjzqznWgfd4pMii7sHtaYF8rx8861hBO80SraY5GT0XQibWZWJSid0avzHGkDIZLImux2S5mXO0Hfct2QCw==",
"dev": true,
"requires": {
"side-channel": "^1.0.4"
}
}
}
},
"@fesjs/preset-built-in": { "@fesjs/preset-built-in": {
"version": "2.0.10", "version": "2.0.10",
"resolved": "https://registry.npmjs.org/@fesjs/preset-built-in/-/preset-built-in-2.0.10.tgz", "resolved": "https://registry.npmjs.org/@fesjs/preset-built-in/-/preset-built-in-2.0.10.tgz",
@ -15518,6 +15836,16 @@
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
"integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==" "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g=="
}, },
"@rollup/pluginutils": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.2.tgz",
"integrity": "sha512-ROn4qvkxP9SyPeHaf7uQC/GPFY6L/OWy9+bd9AwcjOAWQwxRscoEyAUD8qCY5o5iL4jqQwoLk2kaTKJPb/HwzQ==",
"dev": true,
"requires": {
"estree-walker": "^2.0.1",
"picomatch": "^2.2.2"
}
},
"@sideway/address": { "@sideway/address": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz",
@ -15697,6 +16025,12 @@
} }
} }
}, },
"@types/throttle-debounce": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz",
"integrity": "sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==",
"dev": true
},
"@typescript-eslint/eslint-plugin": { "@typescript-eslint/eslint-plugin": {
"version": "5.8.0", "version": "5.8.0",
"dev": true, "dev": true,
@ -16007,6 +16341,32 @@
"@xtuc/long": "4.2.2" "@xtuc/long": "4.2.2"
} }
}, },
"@windicss/config": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/@windicss/config/-/config-1.6.1.tgz",
"integrity": "sha512-E4FKtWdYl5HwFknBQ+Z2JIF58TZiR4/ZiP8B30sfRxNlG6clh4agn5MJqTb4ER0MLkDb30Hugl2tGun0AQNbFw==",
"dev": true,
"requires": {
"debug": "^4.3.3",
"jiti": "^1.12.9",
"windicss": "^3.4.0"
}
},
"@windicss/plugin-utils": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-1.6.1.tgz",
"integrity": "sha512-hFQY27bOr9SSpekIvSwBpIX25nR4cwrU5/1kJFqCwAzqyazvd7U9c/iI1E2sTEQOkPbpTTJkY2Act21Q70oSDQ==",
"dev": true,
"requires": {
"@antfu/utils": "^0.3.0",
"@windicss/config": "1.6.1",
"debug": "^4.3.3",
"fast-glob": "^3.2.7",
"magic-string": "^0.25.7",
"micromatch": "^4.0.4",
"windicss": "^3.4.0"
}
},
"@xtuc/ieee754": { "@xtuc/ieee754": {
"version": "1.2.0" "version": "1.2.0"
}, },
@ -16556,6 +16916,26 @@
"resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz",
"integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g=="
}, },
"builtins": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/builtins/-/builtins-4.0.0.tgz",
"integrity": "sha512-qC0E2Dxgou1IHhvJSLwGDSTvokbRovU5zZFuDY6oY8Y2lF3nGt5Ad8YZK7GMtqzY84Wu7pXTPeHQeHcXSXsRhw==",
"dev": true,
"requires": {
"semver": "^7.0.0"
},
"dependencies": {
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
}
}
}
},
"bytes": { "bytes": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz",
@ -19185,6 +19565,15 @@
} }
} }
}, },
"import-meta-resolve": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-1.1.1.tgz",
"integrity": "sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A==",
"dev": true,
"requires": {
"builtins": "^4.0.0"
}
},
"imurmurhash": { "imurmurhash": {
"version": "0.1.4", "version": "0.1.4",
"dev": true "dev": true
@ -19444,6 +19833,12 @@
} }
} }
}, },
"jiti": {
"version": "1.12.9",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.12.9.tgz",
"integrity": "sha512-TdcJywkQtcwLxogc4rSMAi479G2eDPzfW0fLySks7TPhgZZ4s/tM6stnzayIh3gS/db3zExWJyUx4cNWrwAmoQ==",
"dev": true
},
"jju": { "jju": {
"version": "1.4.0", "version": "1.4.0",
"dev": true "dev": true
@ -19789,6 +20184,15 @@
} }
} }
}, },
"local-pkg": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.0.tgz",
"integrity": "sha512-2XBWjO/v63JeR1HPzLJxdTVRQDB84Av2p2KtBA5ahvpyLUPubcAU6iXlAJrONcY7aSqgJhXxElAnKtnYsRolPQ==",
"dev": true,
"requires": {
"mlly": "^0.2.2"
}
},
"locate-path": { "locate-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
@ -20139,6 +20543,15 @@
"mkdirp": { "mkdirp": {
"version": "1.0.4" "version": "1.0.4"
}, },
"mlly": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/mlly/-/mlly-0.2.10.tgz",
"integrity": "sha512-xfyW6c2QBGArtctzNnTV5leOKX8nOMz2simeubtXofdsdSJFSNw+Ncvrs8kxcN3pBrQLXuYBHNFV6NgZ5Ryf4A==",
"dev": true,
"requires": {
"import-meta-resolve": "^1.1.1"
}
},
"mockjs": { "mockjs": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/mockjs/-/mockjs-1.1.0.tgz", "resolved": "https://registry.npmjs.org/mockjs/-/mockjs-1.1.0.tgz",
@ -21901,6 +22314,17 @@
"version": "3.0.0", "version": "3.0.0",
"dev": true "dev": true
}, },
"side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"dev": true,
"requires": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
}
},
"signal-exit": { "signal-exit": {
"version": "3.0.6", "version": "3.0.6",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
@ -22979,6 +23403,29 @@
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
}, },
"unplugin": {
"version": "0.2.21",
"resolved": "https://registry.npmjs.org/unplugin/-/unplugin-0.2.21.tgz",
"integrity": "sha512-IJ15/L5XbhnV7J09Zjk0FT5HEkBjkXucWAXQWRsmEtUxmmxwh23yavrmDbCF6ZPxWiVB28+wnKIHePTRRpQPbQ==",
"dev": true,
"requires": {
"webpack-virtual-modules": "^0.4.3"
}
},
"unplugin-auto-import": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/unplugin-auto-import/-/unplugin-auto-import-0.5.5.tgz",
"integrity": "sha512-PAP/6WdqWtGhlQBvlVZ7qmhHbLcTYSsARtFSbY/jaUx/SaQkRT7SvronHIKEvx4bPmS+l4erQ9gQKSBBPzvUnQ==",
"dev": true,
"requires": {
"@antfu/utils": "^0.3.0",
"@rollup/pluginutils": "^4.1.2",
"local-pkg": "^0.4.0",
"magic-string": "^0.25.7",
"resolve": "^1.20.0",
"unplugin": "^0.2.21"
}
},
"unset-value": { "unset-value": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
@ -23876,6 +24323,12 @@
} }
} }
}, },
"webpack-virtual-modules": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.4.3.tgz",
"integrity": "sha512-5NUqC2JquIL2pBAAo/VfBP6KuGkHIZQXW/lNKupLPfhViwh8wNsu0BObtl09yuKZszeEUfbXz8xhrHvSG16Nqw==",
"dev": true
},
"webpackbar": { "webpackbar": {
"version": "5.0.2", "version": "5.0.2",
"resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-5.0.2.tgz", "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-5.0.2.tgz",
@ -23959,6 +24412,47 @@
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
}, },
"windicss": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/windicss/-/windicss-3.4.0.tgz",
"integrity": "sha512-X+9Y1/FPxX253Xo4Hk/qfVuvoAxgKx686Z6yHxmBFMH7wRCPdRO42na9k/yEnrW6EqCFJP/GcMIHn3QENaE42g==",
"dev": true
},
"windicss-webpack-plugin": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/windicss-webpack-plugin/-/windicss-webpack-plugin-1.6.2.tgz",
"integrity": "sha512-1NhvBVmClIgxnC6C50RlqdpL9klF4g1JwJAoDNCdY0fO6o5GP6hO+E3xGCWI38l4Ij36JQZ4/CxFKWjdixXFBQ==",
"dev": true,
"requires": {
"@windicss/plugin-utils": "^1.6.1",
"debug": "^4.3.3",
"loader-utils": "^2.0.0",
"lodash": "^4.17.21",
"magic-string": "^0.25.7",
"upath": "^2.0.1",
"webpack-virtual-modules": "^0.4.3",
"windicss": "^3.4.0"
},
"dependencies": {
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"upath": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz",
"integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==",
"dev": true
}
}
},
"word-wrap": { "word-wrap": {
"version": "1.2.3", "version": "1.2.3",
"dev": true "dev": true

View File

@ -42,6 +42,7 @@
"@daotl/prettier-config": "^0.1.2", "@daotl/prettier-config": "^0.1.2",
"@daotl/tsconfig": "^0.0.4", "@daotl/tsconfig": "^0.0.4",
"@fesjs/plugin-sass": "^2.0.0", "@fesjs/plugin-sass": "^2.0.0",
"@fesjs/plugin-windicss": "^2.0.4",
"@vue/compiler-sfc": "^3.2.26", "@vue/compiler-sfc": "^3.2.26",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint-webpack-plugin": "^3.1.1", "eslint-webpack-plugin": "^3.1.1",
@ -53,7 +54,8 @@
"stylelint-config-recommended-scss": "^5.0.2", "stylelint-config-recommended-scss": "^5.0.2",
"stylelint-config-recommended-vue": "^1.1.0", "stylelint-config-recommended-vue": "^1.1.0",
"stylelint-webpack-plugin": "^3.1.0", "stylelint-webpack-plugin": "^3.1.0",
"typescript": "^4.5.4" "typescript": "^4.5.4",
"unplugin-auto-import": "^0.5.5"
}, },
"dependencies": { "dependencies": {
"@fesjs/fes": "^2.0.11", "@fesjs/fes": "^2.0.11",
@ -63,8 +65,5 @@
"@fesjs/plugin-model": "^2.0.3", "@fesjs/plugin-model": "^2.0.3",
"ant-design-vue": "^2.2.0", "ant-design-vue": "^2.2.0",
"vue": "^3.2.6" "vue": "^3.2.6"
},
"lint-staged": {
"*.css": "stylelint --fix"
} }
} }

View File

@ -14,7 +14,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'
import { enums } from '@fesjs/fes' import { enums } from '@fesjs/fes'
const count = ref(0) const count = ref(0)

53
src/types/auto-imports.d.ts vendored Normal file
View File

@ -0,0 +1,53 @@
// Generated by 'unplugin-auto-import'
// We suggest you to commit this file into source control
declare global {
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const effectScope: typeof import('vue')['effectScope']
const EffectScope: typeof import('vue')['EffectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
}
export {}