Skip to content

Commit

Permalink
fix(cli): watch 样式页面文件修改时路径处理
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Apr 9, 2018
1 parent abde772 commit 433e4ee
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/taro-cli/src/weapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,11 +739,7 @@ function watchFiles () {
if (includeStyleJSPath.length) {
includeStyleJSPath.forEach(async item => {
let outputWXSSPath = null
if (item.filePath.indexOf(CONFIG.ENTRY) >= 0) {
outputWXSSPath = item.filePath.replace(path.extname(item.filePath), '.wxss')
} else {
outputWXSSPath = `${path.dirname(item.filePath)}.wxss`
}
outputWXSSPath = item.filePath.replace(path.extname(item.filePath), '.wxss')
let modifySource = outputWXSSPath.replace(appPath + path.sep, '')
modifySource = modifySource.split(path.sep).join('/')
Util.printLog(Util.pocessTypeEnum.MODIFY, '样式文件', modifySource)
Expand Down

0 comments on commit 433e4ee

Please sign in to comment.