Skip to content

Commit 1188238

Browse files
authored
Merge pull request #9 from bcomnes/patch-1
Add newlines between chunks of css
2 parents 97f356d + 099af78 commit 1188238

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function cssExtract (bundle, opts) {
3939
var source = from2(chunk.source)
4040
var sm = staticModule({
4141
'insert-css': function (src) {
42-
writeStream.write(String(src))
42+
writeStream.write(String(src) + '\n')
4343
return from2('null')
4444
}
4545
})

test/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test('css-extract', function (t) {
2525
return bl(function (err, data) {
2626
t.ifError(err, 'no error')
2727
const exPath = path.join(__dirname, './expected.css')
28-
const expected = fs.readFileSync(exPath, 'utf8').trim()
28+
const expected = fs.readFileSync(exPath, 'utf8').trim() + '\n'
2929
t.equal(String(data), expected, 'extracted all the CSS')
3030
})
3131
}
@@ -65,7 +65,7 @@ test('css-extract', function (t) {
6565
return bl(function (err, data) {
6666
t.ifError(err, 'no error')
6767
const exPath = path.join(__dirname, './expected-static.css')
68-
const expected = fs.readFileSync(exPath, 'utf8').trim()
68+
const expected = fs.readFileSync(exPath, 'utf8').trim() + '\n'
6969
t.equal(String(data), expected, 'extracted all the CSS')
7070
})
7171
}

0 commit comments

Comments
 (0)