Fixes #767 - refactors inlining options.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Mon, 26 Dec 2016 14:26:09 +0000 (15:26 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Mon, 26 Dec 2016 15:35:09 +0000 (16:35 +0100)
commit7aa59fb9114ba623b0a4787c9d5787d4f2edda5d
tree0cc1a8fe479ebdee1c7cd580bf151bdc09fa3bd7
parent426127a2fee17d3e4553074d60cee68ee0fa5a41
Fixes #767 - refactors inlining options.

Merges `processImport` and `processImportFrom` API options into
a single `inline` option. It accepts the same set of rules as
`processImportFrom` previously, e.g.

`{ inline: 'none' }`
`{ inline: ['local', '127.0.0.1] }`

Also the `inline` option defaults to `local` now, which means
remote `@import` rules are **NOT** inlined by default anymore.
To re-enable it use any of the following:

`{ inline: 'all' }`
`{ inline: 'local,remote' }`

Why:

* These two options were meant to be merged as they represent the
  same concept;
* Inlining remote `@import` rules by default may not be desirable;
* "Inline" as the option name better represents what this option
  does, as it also applies to source maps.
12 files changed:
History.md
README.md
bin/cleancss
lib/clean.js
lib/reader/apply-source-maps.js
lib/reader/load-original-sources.js
lib/reader/read-sources.js
test/binary-test.js
test/integration-test.js
test/module-test.js
test/protocol-imports-test.js
test/source-map-test.js