Skip to content

Commit

Permalink
feat: 增加缩放组件
Browse files Browse the repository at this point in the history
  • Loading branch information
yue1123 committed Mar 30, 2022
1 parent 68911ea commit 6e37765
Show file tree
Hide file tree
Showing 19 changed files with 344 additions and 712 deletions.
21 changes: 13 additions & 8 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ import { defineUserConfig } from 'vuepress'
import type { DefaultThemeOptions } from 'vuepress'
import { capitalize, camelize } from 'vue'
const { resolve, join } = require('path')
const root = process.cwd()

console.log(
join(__dirname, '../../types/'),
'===================================='
)
export default defineUserConfig<DefaultThemeOptions>({
// 站点配置
lang: 'en-US',
Expand All @@ -33,6 +30,7 @@ export default defineUserConfig<DefaultThemeOptions>({
}
]
},

plugins: [
[
'@vuepress/register-components',
Expand All @@ -41,11 +39,18 @@ export default defineUserConfig<DefaultThemeOptions>({
componentsPatterns: ['**/*.vue'],
getComponentName: (filename) => {
// 转驼峰
return camelize(
capitalize(filename.replace(/\/\w+\.vue$/, ''))
)
return camelize(capitalize(filename.replace(/\/\w+\.vue$/, '')))
}
}
]
]
],
bundlerConfig: {
root,
resolve: {
alias: {
hooks: join(root, 'src/hooks'),
types: join(root, 'src/types')
}
}
}
})
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
"packageManager": "pnpm",
"dependencies": {
"mitt": "^3.0.0",
"vue": "^3.2.25"
"vue": "^3.2.31"
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@vitejs/plugin-vue": "^2.2.0",
"@vitejs/plugin-vue": "^2.3.0",
"@vuepress/plugin-register-components": "^2.0.0-beta.36",
"husky": "^7.0.4",
"less": "^4.1.2",
"typescript": "^4.5.4",
"vite": "^2.8.0",
"vue-tsc": "^0.29.8",
"typescript": "^4.6.3",
"vite": "~2.5.0",
"vue-tsc": "^0.33.9",
"vuepress": "^2.0.0-beta.36"
},
"engines": {
Expand Down
Loading

0 comments on commit 6e37765

Please sign in to comment.