File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11var through = require ( 'through2' )
22var postcss = require ( 'postcss' )
33var applySourceMap = require ( 'vinyl-sourcemaps-apply' )
4- var _ = require ( 'lodash' )
54
65
76module . exports = function ( processors , options ) {
@@ -11,9 +10,19 @@ module.exports = function (processors, options) {
1110 function transform ( file , encoding , cb ) {
1211
1312 // Source map is inline by default
14- var opts = _ . extend ( { map : 'inline' } , options )
13+ var opts = { map : 'inline' }
1514 var processor = postcss ( )
1615 var result
16+ var attr
17+
18+ // Extend default options
19+ if ( options ) {
20+ for ( attr in options ) {
21+ if ( options . hasOwnProperty ( attr ) ) {
22+ opts [ attr ] = options [ attr ]
23+ }
24+ }
25+ }
1726
1827 if ( file . base && file . path ) {
1928 opts . from = file . relative
Original file line number Diff line number Diff line change 2323 "homepage" : " https://github.com/w0rm/gulp-postcss" ,
2424 "dependencies" : {
2525 "gulp-util" : " ^3.0.0" ,
26- "lodash" : " ^2.4.1" ,
2726 "postcss" : " ^2.1.2" ,
2827 "through2" : " ^0.6.1" ,
2928 "vinyl-sourcemaps-apply" : " ^0.1.1"
You can’t perform that action at this time.
0 commit comments