Skip to content

Commit

Permalink
增加快应用build平台触发
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhouhu authored and Chen-jj committed Nov 7, 2019
1 parent 03046ae commit d1b1bfa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/taro-cli/src/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Compiler } from '../h5'
import { buildH5Script, buildForH5 } from './h5'
import { buildForRN } from './rn'
import { buildForWeapp } from './weapp'
import { buildForQuickapp } from './quickapp'
import CONFIG from '../config'
import { resolveScriptPath, printLog } from '../util'
import {
Expand Down Expand Up @@ -204,10 +205,12 @@ export async function build (appPath, {watch, uiIndex}: IBuildConfig) {
console.log(uiIndex)
setBuildData(appPath, uiIndex)
setMiniBuildData(appPath, BUILD_TYPES.WEAPP)
setMiniBuildData(appPath, BUILD_TYPES.QUICKAPP)
buildEntry(uiIndex)
const platforms = _.get(buildData, 'projectConfig.ui.platforms')
if (platforms && Array.isArray(platforms)) {
platforms.includes(BUILD_TYPES.WEAPP) && await buildForWeapp(buildData)
platforms.includes(BUILD_TYPES.QUICKAPP) && await buildForQuickapp(buildData)
platforms.includes(BUILD_TYPES.H5) && await buildForH5(uiIndex, buildData)
platforms.includes(BUILD_TYPES.RN) && await buildForRN(uiIndex, buildData)
} else {
Expand Down

0 comments on commit d1b1bfa

Please sign in to comment.