Merge branch 'master' into alpha

This commit is contained in:
qiang 2019-08-27 14:40:05 +08:00
commit 46722dad17
3 changed files with 27 additions and 14 deletions

View File

@ -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)
}) })
} }

View File

@ -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": {
"@/*": [ "@/*": [

View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"types": [
"uni-app",
"html5plus",
"miniprogram-api-typings",
"mini-types"
]
}
}