Skip to content

Commit 19bf6f9

Browse files
committed
匹配 Scss 文件作者时处理不同换行符的差异
1 parent b0a4bd5 commit 19bf6f9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

workflow/task/initProject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ module.exports = function(gulp, common) {
4242
gulp.src(_sourceArr)
4343
.pipe(common.plugins.replace('qui_', common.config.prefix + '_'))
4444
.pipe(common.plugins.replace(_dateRegex, _formattingDate))
45-
.pipe(common.plugins.replace(/@author .*\n/, '@author ' + _authorName + '\n'))
45+
.pipe(common.plugins.replace(/@author .*([\r\n])/, '@author ' + _authorName + '$1'))
4646
.pipe(gulp.dest('../project'));
4747

4848
gulp.src(['project/demo.scss'])
4949
.pipe(common.plugins.replace('../qmui/_qmui.scss', _targetQmuiStylePath))
5050
.pipe(common.plugins.replace('demo.scss', common.config.resultCssFileName))
5151
.pipe(common.plugins.replace(_dateRegex, _formattingDate))
52-
.pipe(common.plugins.replace(/@author .*\n/, '@author ' + _authorName + '\n'))
52+
.pipe(common.plugins.replace(/@author .*([\r\n])/, '@author ' + _authorName + '$1'))
5353
.pipe(common.plugins.rename(common.config.resultCssFileName))
5454
.pipe(gulp.dest('../project'));
5555

0 commit comments

Comments
 (0)