File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 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')
22const from2 = require ( 'from2-string' )
33const through = require ( 'through2' )
44const assert = require ( 'assert' )
5+ const d = require ( 'defined' )
56const bl = require ( 'bl' )
67const fs = require ( 'fs' )
78
@@ -13,6 +14,7 @@ function cssExtract (bundle, opts) {
1314 opts = opts || { }
1415
1516 var outFile = opts . out || opts . o || 'bundle.css'
17+ var sourceMap = d ( opts . sourceMap , bundle && bundle . _options && bundle . _options . debug , false )
1618
1719 assert . equal ( typeof bundle , 'object' , 'bundle should be an object' )
1820 assert . equal ( typeof opts , 'object' , 'opts should be an object' )
@@ -46,7 +48,7 @@ function cssExtract (bundle, opts) {
4648 writeStream . write ( String ( src ) + '\n' )
4749 return from2 ( 'null' )
4850 }
49- } )
51+ } , { sourceMap : sourceMap } )
5052
5153 source . pipe ( sm ) . pipe ( bl ( complete ) )
5254
Original file line number Diff line number Diff line change 2121 "license" : " MIT" ,
2222 "dependencies" : {
2323 "bl" : " ^1.1.2" ,
24+ "defined" : " ^1.0.0" ,
2425 "from2-string" : " ^1.1.0" ,
25- "static-module" : " ^1.3 .0" ,
26+ "static-module" : " ^2.2 .0" ,
2627 "through2" : " ^2.0.1"
2728 },
2829 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments