@@ -35,20 +35,21 @@ module.exports = function(gulp, common) {
3535 _currentMonth = common . lib . checkDateFormat ( _currentDate . getMonth ( ) + 1 ) ,
3636 _currentDay = common . lib . checkDateFormat ( _currentDate . getDate ( ) ) ,
3737 _formattingDate = _currentYear + '-' + _currentMonth + '-' + _currentDay ,
38- _targetQmuiStylePath = '../' + path . resolve ( '.' ) . replace ( / \\ / g, '/' ) . split ( '/' ) . pop ( ) + '/qmui/_qmui.scss' ;
38+ _targetQmuiStylePath = '../' + path . resolve ( '.' ) . replace ( / \\ / g, '/' ) . split ( '/' ) . pop ( ) + '/qmui/_qmui.scss' ,
39+ _authorName = common . lib . upperFirst ( path . basename ( os . homedir ( ) ) ) ;
3940
4041 // 执行创建项目的任务
4142 gulp . src ( _sourceArr )
4243 . pipe ( common . plugins . replace ( 'qui_' , common . config . prefix + '_' ) )
4344 . pipe ( common . plugins . replace ( _dateRegex , _formattingDate ) )
44- . pipe ( common . plugins . replace ( / @ a u t h o r .* \n $ / , '@author ' + path . basename ( os . homedir ( ) ) + '\n' ) )
45+ . pipe ( common . plugins . replace ( / @ a u t h o r .* \n / , '@author ' + _authorName + '\n' ) )
4546 . pipe ( gulp . dest ( '../project' ) ) ;
4647
4748 gulp . src ( [ 'project/demo.scss' ] )
4849 . pipe ( common . plugins . replace ( '../qmui/_qmui.scss' , _targetQmuiStylePath ) )
4950 . pipe ( common . plugins . replace ( 'demo.scss' , common . config . resultCssFileName ) )
5051 . pipe ( common . plugins . replace ( _dateRegex , _formattingDate ) )
51- . pipe ( common . plugins . replace ( / @ a u t h o r .* \n $ / , '@author ' + path . basename ( os . homedir ( ) ) + '\n' ) )
52+ . pipe ( common . plugins . replace ( / @ a u t h o r .* \n / , '@author ' + _authorName + '\n' ) )
5253 . pipe ( common . plugins . rename ( common . config . resultCssFileName ) )
5354 . pipe ( gulp . dest ( '../project' ) ) ;
5455
0 commit comments