1
1
'use strict' ;
2
- var gutil = require ( 'gulp-util' ) ;
2
+ var PluginError = require ( 'plugin-error' ) ;
3
+ var Vinyl = require ( 'vinyl' ) ;
3
4
var path = require ( 'path' ) ;
4
5
var rework = require ( 'rework' ) ;
5
6
var reworkImport = require ( 'rework-import' ) ;
@@ -23,7 +24,7 @@ module.exports = function(destFile, options) {
23
24
var processedCss ;
24
25
25
26
if ( file . isStream ( ) ) {
26
- this . emit ( 'error' , new gutil . PluginError ( 'gulp-concat-css' , 'Streaming not supported' ) ) ;
27
+ this . emit ( 'error' , new PluginError ( 'gulp-concat-css' , 'Streaming not supported' ) ) ;
27
28
return cb ( ) ;
28
29
}
29
30
@@ -99,7 +100,7 @@ module.exports = function(destFile, options) {
99
100
100
101
processedCss = processedCss . toString ( ) ;
101
102
} catch ( err ) {
102
- this . emit ( 'error' , new gutil . PluginError ( 'gulp-concat-css' , err ) ) ;
103
+ this . emit ( 'error' , new PluginError ( 'gulp-concat-css' , err ) ) ;
103
104
return cb ( ) ;
104
105
}
105
106
@@ -112,9 +113,9 @@ module.exports = function(destFile, options) {
112
113
113
114
var contents = urlImportRules . map ( function ( rule ) {
114
115
return '@import ' + rule . import + ';' ;
115
- } ) . concat ( buffer ) . join ( gutil . linefeed ) ;
116
+ } ) . concat ( buffer ) . join ( '\n' ) ;
116
117
117
- var concatenatedFile = new gutil . File ( {
118
+ var concatenatedFile = new Vinyl ( {
118
119
base : firstFile . base ,
119
120
cwd : firstFile . cwd ,
120
121
path : path . join ( firstFile . base , destFile ) ,
0 commit comments