How to use the @dcloudio/uni-cli-shared.getFlexDirection function in @dcloudio/uni-cli-shared

To help you get started, we’ve selected a few @dcloudio/uni-cli-shared examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dcloudio / uni-app / packages / webpack-uni-pages-loader / lib / platforms / app-plus / index.js View on Github external
}
    }
    if (!process.env.UNI_USING_COMPONENTS) { // 非自定义组件模式下,仍旧添加 render always
      addRenderAlways()
    }
  } else {
    addRenderAlways()
  }

  let flexDir = false

  if (manifestJson.plus.nvueCompiler && manifestJson.plus.nvueCompiler === 'weex') {
    appJson.nvueCompiler = 'weex'
  } else {
    appJson.nvueCompiler = 'uni-app'
    flexDir = getFlexDirection(manifestJson.plus)
  }

  if (manifestJson.plus.renderer === 'native') {
    appJson.renderer = 'native'
  } else {
    appJson.renderer = 'auto'
  }

  const nvueCompilerFilePath = path.resolve(process.env.UNI_OUTPUT_DIR, '__uniappnvuecompiler.js')
  const nvueCompilerExists = fs.existsSync(nvueCompilerFilePath)

  if (appJson.nvueCompiler === 'uni-app') {
    if (!nvueCompilerExists) {
      fsExtra.outputFile(nvueCompilerFilePath, '')
    }
  } else {
github dcloudio / uni-app / packages / webpack-uni-pages-loader / lib / platforms / h5.js View on Github external
) {
    qqMapKey = sdkConfigs.maps.qqmap.key
  }

  return `
import Vue from 'vue'
global['____${h5.appid}____'] = true;
delete global['____${h5.appid}____'];
global.__uniConfig = ${JSON.stringify(pagesJson)};
global.__uniConfig.router = ${JSON.stringify(h5.router)};
global.__uniConfig['async'] = ${JSON.stringify(h5['async'])};
global.__uniConfig.debug = ${manifestJson.debug === true};
global.__uniConfig.networkTimeout = ${JSON.stringify(networkTimeoutConfig)};
global.__uniConfig.sdkConfigs = ${JSON.stringify(sdkConfigs)};
global.__uniConfig.qqMapKey = ${JSON.stringify(qqMapKey)};
global.__uniConfig.nvue = ${JSON.stringify({ 'flex-direction': getFlexDirection(manifestJson['app-plus']) })}
${genRegisterPageVueComponentsCode(pageComponents)}
global.__uniRoutes=[${genPageRoutes(pageComponents).concat(genSystemRoutes()).join(',')}]
`
}