File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const staticModule = require('static-module')
2
2
const from2 = require ( 'from2-string' )
3
3
const through = require ( 'through2' )
4
4
const assert = require ( 'assert' )
5
+ const d = require ( 'defined' )
5
6
const bl = require ( 'bl' )
6
7
const fs = require ( 'fs' )
7
8
@@ -13,6 +14,7 @@ function cssExtract (bundle, opts) {
13
14
opts = opts || { }
14
15
15
16
var outFile = opts . out || opts . o || 'bundle.css'
17
+ var sourceMap = d ( opts . sourceMap , bundle && bundle . _options && bundle . _options . debug , false )
16
18
17
19
assert . equal ( typeof bundle , 'object' , 'bundle should be an object' )
18
20
assert . equal ( typeof opts , 'object' , 'opts should be an object' )
@@ -46,7 +48,7 @@ function cssExtract (bundle, opts) {
46
48
writeStream . write ( String ( src ) + '\n' )
47
49
return from2 ( 'null' )
48
50
}
49
- } )
51
+ } , { sourceMap : sourceMap } )
50
52
51
53
source . pipe ( sm ) . pipe ( bl ( complete ) )
52
54
Original file line number Diff line number Diff line change 21
21
"license" : " MIT" ,
22
22
"dependencies" : {
23
23
"bl" : " ^1.1.2" ,
24
+ "defined" : " ^1.0.0" ,
24
25
"from2-string" : " ^1.1.0" ,
25
- "static-module" : " ^1.3 .0" ,
26
+ "static-module" : " ^2.2 .0" ,
26
27
"through2" : " ^2.0.1"
27
28
},
28
29
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments