Skip to content

Commit 7733df6

Browse files
Fixes #17 - disallows empty --inline switch.
1 parent 0475c14 commit 7733df6

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

History.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
[4.1.x / 2018-xx-xx](https://github.com/jakubpawlowicz/clean-css-cli/compare/v4.1.10...4.1)
2+
==================
3+
4+
* Fixed issue [#17](https://github.com/jakubpawlowicz/clean-css-cli/issues/17) - empty `--inline` switch.
5+
16
[4.1.10 / 2017-09-19](https://github.com/jakubpawlowicz/clean-css-cli/compare/v4.1.9...v4.1.10)
27
==================
38

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function cli(process, beforeMinifyCallback) {
144144
options = {
145145
compatibility: commands.compatibility,
146146
format: commands.format,
147-
inline: commands.inline || 'local',
147+
inline: typeof commands.inline == 'string' ? commands.inline : 'local',
148148
inlineTimeout: commands.inlineTimeout * 1000,
149149
level: commands.O0 || commands.O1 || commands.O2 ?
150150
{ '0': commands.O0, '1': commands.O1, '2': commands.O2 } :

test/binary-test.js

+5
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ vows.describe('cleancss')
221221
assert.equal(stdout, '@import url(http://127.0.0.1/remote.css);.one{color:red}');
222222
}
223223
}),
224+
'disable remote @import as default #2': pipedContext('@import url(http://127.0.0.1/remote.css);@import url(test/fixtures/partials/one.css);', '--inline', {
225+
'keeps remote import rule': function (error, stdout) {
226+
assert.equal(stdout, '@import url(http://127.0.0.1/remote.css);.one{color:red}');
227+
}
228+
}),
224229
'disable remote @import by host': pipedContext('@import url(http://127.0.0.1/remote.css);@import url(test/fixtures/partials/one.css);', '--inline !127.0.0.1', {
225230
'keeps remote import rule': function (error, stdout) {
226231
assert.equal(stdout, '@import url(http://127.0.0.1/remote.css);.one{color:red}');

0 commit comments

Comments
 (0)