Breaking
Under the hook
Breaking
Features:
- Add
cache
option to cache resolved dimensions (#73).
Features:
relative
option supports whatrelativeTo
option did in 3.x: if a string is passed, paths are generated relatively to a path in that string. A behavior of relating to input files by passingtrue
is kept untouched.
Under the hood:
- Code updated to match Airbnb code style.
- Tests converted to ES6 syntax.
Bugfixes
- Works fine with no options provided (#45).
Breaking
-
Removes
relativeTo
option, introducesrelative
one.There is no need to specify a particular file to relate to anymore - set
relative
totrue
and Assets would resolve URLs relatively to the current CSS file.This solves the issue when you have stylesheets in different folders and want relative paths — previously there was an option to relate only to a single directory.
(#42)
Features
-
Load paths now accept globs:
var options = { loadPaths: ["images", "assets/**/img"] };
(#40)
-
Load paths now also accept single strings:
var options = { loadPaths: "assets/**/img" };
Bugfixes
- Really fixes the SVG rendering on Internet Explorer.
- SCSS flags are preserved (#43).
- No more funky file names in the repo to make Windows archiver happy (#35).
- Allows numbers to be returned from the cachebuster function.
Under the hood
- Coverage hits 100%.
- Automated tests against the latest stable nodejs, v0.12 and v4.
- Builds are automatically tested on Windows by AppVeyor.
- Switches tests from Mocha to AVA.
- Uses Calipers for image measurement instead of image-size.
- Replaces custom function mapper with postcss-functions.
- Extracts assets processing logic to the Assets module.
- Cleans up dependencies.
Bugfixes
- no longer uses private
image-size
fork, so properly installs on Windows (#30, #32); - properly calculates dimensions of SVGs with percentage values of
width
/height
attributes (#33).
Bugfixes
- IE understands generated SVG (#24).
Bugfixes
- Preserves Microsoft filters (#27).
Under the hood
- Uses ESLint instead of JSHint/JSCS.
API updates
- better PostCSS 5.0 API conformance (#25).
Since private image-size
fork was removed, releases 2.1.0—3.0.2 has stopped working. While 3.0.3 release fixes this for the 3.0.x versions, this release is fixing the same for the 2.1.x.
Bugfixes
- no longer uses private
image-size
fork (#37)
Bugfixes
- better PostCSS plugin API conformance (#21). This allows plugin to be used with Webpack.
Under the hood
- PostCSS Plugin Guidelines conformance (#20);
- continious integration tests on both Node.js and io.js;
- shows coverage statistics on the repository page.
Bugfixes
- fix path separator handling on Windows (#19).
Under the hood
- covers 99% of the code;
- explains code with comments.
API updates
Bugfixes
- uses forked version of image-size to support viewbox-only svgs;
- properly encodes some tricky SVG files (#18).
Under the hood
API updates
- Renames
url()
function toresolve()
#13 - Resolves assets relative to the source file #7
- Starts throwing errors instead of warnings #8
- Fixes a bug when complex URL declarations were crashing Gonzales #15
Under the hood
- Tests with Mocha/Chai instead of Tape #12
- Updates dependencies upto the latest versions
Allows to use common PostCSS plugin API (#6) Fixes quotes when inlining SVG (#14)
Base64-encodes with Buffer.
Cachebuster recognizes resolved paths.
Uses PostCSS 4.0.
Introduces cachebuster.
- [
width
,height
andsize
functions][1] are introduced to measure image dimesions with high density pixels support; - [
inline
function][2] introduced to inline files; url
function automagic is removed;inline.maxSize
option is removed;- all modifiers are removed. [1]: https://github.com/borodean/postcss-assets/tree/3168ab2b07cf537240ecc20e0eb7688434987614#image-dimensions [2]: https://github.com/borodean/postcss-assets/tree/3168ab2b07cf537240ecc20e0eb7688434987614#inlining-files
Inlines SVG as UTF-8, not Base64.
Hello, world.