Skip to content

Commit

Permalink
feat(RN): 去掉多余的log
Browse files Browse the repository at this point in the history
  • Loading branch information
Pines-Cheng committed Aug 29, 2018
1 parent 38b936b commit 883be60
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/taro-cli/src/rn.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const appPath = process.cwd()
const projectConfig = require(path.join(appPath, Util.PROJECT_CONFIG))(_.merge)
const sourceDirName = projectConfig.sourceRoot || CONFIG.SOURCE_DIR
const sourceDir = path.join(appPath, sourceDirName)
const appStylePath = path.resolve(sourceDir, 'app.scss')
const tempDir = '.rn_temp'
const tempPath = path.join(appPath, tempDir)
const entryFilePath = Util.resolveScriptPath(path.join(sourceDir, CONFIG.ENTRY))
Expand Down Expand Up @@ -496,7 +497,7 @@ function parseJSCode (code, filePath) {
function compileDepStyles (filePath, styleFiles) {
// 合并 app.scss ,支持全局样式
if (filePath !== entryFileName) {
styleFiles.push(path.resolve(sourceDir, 'app.scss'))
styleFiles.push(appStylePath)
}
if (isBuildingStyles[filePath]) {
return Promise.resolve({})
Expand All @@ -505,7 +506,9 @@ function compileDepStyles (filePath, styleFiles) {
return Promise.all(styleFiles.map(async p => { // to css string
const filePath = path.join(p)
const fileExt = path.extname(filePath)
Util.printLog(Util.pocessTypeEnum.COMPILE, _.camelCase(fileExt).toUpperCase(), filePath)
if (filePath !== appStylePath) {
Util.printLog(Util.pocessTypeEnum.COMPILE, _.camelCase(fileExt).toUpperCase(), filePath)
}
const pluginName = Util.FILE_PROCESSOR_MAP[fileExt]
if (pluginName) {
return npmProcess.callPlugin(pluginName, null, filePath, pluginsConfig[pluginName] || {})
Expand Down

0 comments on commit 883be60

Please sign in to comment.