mirror of
https://gitee.com/dcloud/uni-preset-vue
synced 2025-04-29 16:30:12 +08:00
Merge branch 'master' into alpha
This commit is contained in:
commit
46722dad17
11
generator.js
11
generator.js
@ -35,10 +35,13 @@ module.exports = (api, options, rootOptions) => {
|
|||||||
api.extendPackage(pkg => {
|
api.extendPackage(pkg => {
|
||||||
return {
|
return {
|
||||||
dependencies: {
|
dependencies: {
|
||||||
'regenerator-runtime': '^0.12.1'// 锁定版本,避免高版本在小程序中出错
|
'regenerator-runtime': '^0.12.1',// 锁定版本,避免高版本在小程序中出错
|
||||||
|
'@dcloudio/uni-helper-json': '*'
|
||||||
},
|
},
|
||||||
devDependencies: {
|
devDependencies: {
|
||||||
'postcss-comment': '^2.0.0'
|
'postcss-comment': '^2.0.0',
|
||||||
|
'miniprogram-api-typings': '^2.8.0-2',
|
||||||
|
'mini-types': '*'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -86,7 +89,7 @@ module.exports = (api, options, rootOptions) => {
|
|||||||
const template = options.repo || options.template
|
const template = options.repo || options.template
|
||||||
|
|
||||||
const base = 'src'
|
const base = 'src'
|
||||||
|
await generate(path.resolve(__dirname, './template/common'), files)
|
||||||
if (template === 'default') {
|
if (template === 'default') {
|
||||||
await generate(path.resolve(__dirname, './template/default'), files, base, rootOptions)
|
await generate(path.resolve(__dirname, './template/default'), files, base, rootOptions)
|
||||||
} else if (template === 'default-ts') {
|
} else if (template === 'default-ts') {
|
||||||
@ -122,7 +125,5 @@ module.exports = (api, options, rootOptions) => {
|
|||||||
|
|
||||||
await generate(tmp, files, base)
|
await generate(tmp, files, base)
|
||||||
}
|
}
|
||||||
|
|
||||||
await generate(path.resolve(__dirname, './template/common'), files)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"types": [
|
"types": [
|
||||||
"webpack-env",
|
"webpack-env",
|
||||||
"@dcloudio/types/uni-app"
|
"@dcloudio/types/uni-app",
|
||||||
|
"miniprogram-api-typings",
|
||||||
|
"mini-types"
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": [
|
"@/*": [
|
||||||
|
10
template/common/tsconfig.json
Normal file
10
template/common/tsconfig.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"types": [
|
||||||
|
"uni-app",
|
||||||
|
"html5plus",
|
||||||
|
"miniprogram-api-typings",
|
||||||
|
"mini-types"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user