@@ -100,12 +100,10 @@ const scriptsConcat = function(option) {
100
100
return console . log ( 'scriptsConcat()参数错误!' ) ;
101
101
}
102
102
if ( ! option . mapsrc ) {
103
- option . mapsrc = './' ;
103
+ option . mapsrc = './maps ' ;
104
104
}
105
105
gulp . src ( option . src )
106
106
. pipe ( plumber ( ) )
107
- . pipe ( replace ( globalConfig . rootHolder , globalConfig . serverRoot ) )
108
- . pipe ( replace ( globalConfig . distHolder , distHolderFinal ) )
109
107
. pipe ( tap ( function ( file ) {
110
108
if ( file . contents ) {
111
109
let content = file . contents . toString ( ) ;
@@ -120,8 +118,10 @@ const scriptsConcat = function(option) {
120
118
}
121
119
return file ;
122
120
} ) )
123
- . pipe ( concat ( option . name ) )
124
121
. pipe ( globalConfig . compress ? sourcemaps . init ( ) : gutil . noop ( ) )
122
+ . pipe ( concat ( option . name ) )
123
+ . pipe ( replace ( globalConfig . rootHolder , globalConfig . serverRoot ) )
124
+ . pipe ( replace ( globalConfig . distHolder , distHolderFinal ) )
125
125
. pipe ( globalConfig . compress ? uglify ( ) : gutil . noop ( ) )
126
126
. pipe ( globalConfig . compress ? sourcemaps . write ( option . mapsrc ) : gutil . noop ( ) )
127
127
. pipe ( gulp . dest ( option . dest ) )
@@ -146,7 +146,7 @@ const scriptsNormalOut = function(option) {
146
146
return console . log ( 'scriptsNormalOut()参数错误!' ) ;
147
147
}
148
148
if ( ! option . mapsrc ) {
149
- option . mapsrc = './' ;
149
+ option . mapsrc = './maps ' ;
150
150
}
151
151
gulp . src ( option . src )
152
152
. pipe ( plumber ( ) )
@@ -179,7 +179,7 @@ const cssNormalOut = function(option) {
179
179
return console . log ( 'cssNormalOut()参数错误!' ) ;
180
180
}
181
181
if ( ! option . mapsrc ) {
182
- option . mapsrc = './' ;
182
+ option . mapsrc = './maps ' ;
183
183
}
184
184
gulp . src ( option . src )
185
185
. pipe ( plumber ( ) )
@@ -195,13 +195,13 @@ const cssNormalOut = function(option) {
195
195
file . contents = Buffer . from ( content ) ;
196
196
return file ;
197
197
} ) )
198
- . pipe ( replace ( globalConfig . projectHolder , globalConfig . projectDir ) )
199
- . pipe ( replace ( globalConfig . distHolder , distHolderFinal ) )
200
198
. pipe ( globalConfig . compress ? sourcemaps . init ( ) : gutil . noop ( ) )
199
+ . pipe ( replace ( globalConfig . projectHolder , globalConfig . projectDir ) )
201
200
. pipe ( less ( {
202
201
plugins : [ autoprefix ] ,
203
202
compress : globalConfig . compress
204
203
} ) )
204
+ . pipe ( replace ( globalConfig . distHolder , distHolderFinal ) )
205
205
. pipe ( globalConfig . compress ? sourcemaps . write ( option . mapsrc ) : gutil . noop ( ) )
206
206
. pipe ( gulp . dest ( option . dest ) )
207
207
. on ( 'end' , function ( ) {
@@ -241,7 +241,6 @@ const scriptApp = function(filePath, callback) {
241
241
scriptsNormalOut ( {
242
242
src : globalConfig . paths . scriptApp ,
243
243
dest : globalConfig . dist . js ,
244
- mapsrc : './maps' ,
245
244
compress : false ,
246
245
callback : callback
247
246
} ) ;
0 commit comments