Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const staticModule = require('static-module')
const from2 = require('from2-string')
const through = require('through2')
const assert = require('assert')
const d = require('defined')
const bl = require('bl')
const fs = require('fs')

Expand All @@ -13,6 +14,7 @@ function cssExtract (bundle, opts) {
opts = opts || {}

var outFile = opts.out || opts.o || 'bundle.css'
var sourceMap = d(opts.sourceMap, bundle && bundle._options && bundle._options.debug, false)

assert.equal(typeof bundle, 'object', 'bundle should be an object')
assert.equal(typeof opts, 'object', 'opts should be an object')
Expand Down Expand Up @@ -46,7 +48,7 @@ function cssExtract (bundle, opts) {
writeStream.write(String(src) + '\n')
return from2('null')
}
})
}, { sourceMap: sourceMap })

source.pipe(sm).pipe(bl(complete))

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
"license": "MIT",
"dependencies": {
"bl": "^1.1.2",
"defined": "^1.0.0",
"from2-string": "^1.1.0",
"static-module": "^1.3.0",
"static-module": "^2.2.0",
"through2": "^2.0.1"
},
"devDependencies": {
Expand Down