Jakub Pawlowicz [Wed, 3 Dec 2014 18:50:45 +0000 (18:50 +0000)]
Fixes rouge whitespace handling.
Jakub Pawlowicz [Mon, 1 Dec 2014 21:26:20 +0000 (21:26 +0000)]
Fixes generating relative paths to mapped source files.
Jakub Pawlowicz [Mon, 1 Dec 2014 20:40:59 +0000 (20:40 +0000)]
Fixes building source maps for styles with and without an input map.
* Previously stringifier was raisining an issue about a missing input source map.
Jakub Pawlowicz [Sat, 29 Nov 2014 23:54:20 +0000 (23:54 +0000)]
Simplifies resolving paths in source map stringifier.
Jakub Pawlowicz [Sat, 29 Nov 2014 23:47:12 +0000 (23:47 +0000)]
Refactors source map stringifier in OO style.
Jakub Pawlowicz [Thu, 27 Nov 2014 23:15:54 +0000 (23:15 +0000)]
Changes column base in source maps from 1 to 0.
* Apparently columns are counted from 0 in source maps. Bizarre but true.
Jakub Pawlowicz [Wed, 26 Nov 2014 18:33:21 +0000 (18:33 +0000)]
Removes `name` property from output source map.
* Per discussion with Luke Page (see #125) it is used in case of shortened variables
so probably useless when it comes to CSS.
Jakub Pawlowicz [Wed, 26 Nov 2014 18:26:24 +0000 (18:26 +0000)]
Adds correct rebasing for sources in input source maps.
* Supports absolute paths (when `root` option given).
* Supports relative paths (when `target` option given).
* Supports remote URLs.
Jakub Pawlowicz [Sun, 23 Nov 2014 10:31:28 +0000 (10:31 +0000)]
Fixes an issue with incorrect source maps inside property blocks.
Jakub Pawlowicz [Wed, 19 Nov 2014 08:02:14 +0000 (08:02 +0000)]
Ensures CLI presents a warning when source map is set but target file is not.
Jakub Pawlowicz [Sun, 16 Nov 2014 12:33:21 +0000 (12:33 +0000)]
Adds support for remote source maps.
* http, https, and same protocol (//) are supported.
* Options from `inliner` hash are used for timeouts / extra request options.
* Errors & timeouts are handled gracefully.
* Apparently nock.restore() should be nock.cleanAll().
Jakub Pawlowicz [Fri, 14 Nov 2014 21:56:20 +0000 (21:56 +0000)]
Enables source map tracking only if sourceMap is not falsy.
Jakub Pawlowicz [Fri, 14 Nov 2014 19:51:07 +0000 (19:51 +0000)]
Speeds up source maps by restoring escaped content only if needed.
Jakub Pawlowicz [Wed, 12 Nov 2014 23:10:57 +0000 (23:10 +0000)]
Adds tracking input source maps in imported files.
* InputSourceMapTracker tracks source maps on per-file basis.
Jakub Pawlowicz [Tue, 11 Nov 2014 19:48:28 +0000 (19:48 +0000)]
Adds pulling input source maps from source map comment.
Jakub Pawlowicz [Tue, 11 Nov 2014 18:41:54 +0000 (18:41 +0000)]
Adds basic support for input source maps.
* `sourceMap` option can be given as source map string.
* Particularly useful for preprocessed stylesheets.
Jakub Pawlowicz [Sun, 9 Nov 2014 16:06:40 +0000 (16:06 +0000)]
Adds `--source-map` switch for building input's source map.
* It's enabled in CLI only if output file is given.
Jakub Pawlowicz [Sat, 8 Nov 2014 12:23:08 +0000 (12:23 +0000)]
Adds `--skip-shorthand-compacting`/`shorthandComacting` option for disabling shorthand compacting.
* Also disables shorthand compacting for source maps as it is not defined well enough, yet.
Jakub Pawlowicz [Thu, 6 Nov 2014 13:45:48 +0000 (13:45 +0000)]
Adds source map stringifier.
* Stringifying with source maps "on" requires doing it in different order.
* Basically restoring escaped data has to be done on every token rather than at the end.
Jakub Pawlowicz [Fri, 7 Nov 2014 18:51:41 +0000 (18:51 +0000)]
Fixes stray whitespace tracking in blocks (@media, etc).
Jakub Pawlowicz [Thu, 6 Nov 2014 13:51:57 +0000 (13:51 +0000)]
Fixes line tracking in blocks (@media, @font-face, etc).
Jakub Pawlowicz [Mon, 3 Nov 2014 20:59:13 +0000 (20:59 +0000)]
Changes minify method output to handle multiple outputs.
Jakub Pawlowicz [Sun, 2 Nov 2014 16:20:53 +0000 (16:20 +0000)]
Extracts rebuilding tokens into Stringifier class.
Jakub Pawlowicz [Sun, 2 Nov 2014 15:57:17 +0000 (15:57 +0000)]
Adds source file tracking to source maps.
Jakub Pawlowicz [Wed, 29 Oct 2014 20:26:21 +0000 (20:26 +0000)]
Adds line/column tracking in tokenization.
Jakub Pawlowicz [Mon, 27 Oct 2014 20:46:17 +0000 (20:46 +0000)]
Moves cleaning up tokens out of tokenizer.
* Pulls out extracting logic into an utility class.
Jakub Pawlowicz [Sun, 26 Oct 2014 11:43:47 +0000 (11:43 +0000)]
Refactors advanced optimizer to get rid of functions in loops.
Jakub Pawlowicz [Sun, 26 Oct 2014 11:32:38 +0000 (11:32 +0000)]
Clarifies conditions in advanced processing.
Jakub Pawlowicz [Sun, 26 Oct 2014 11:20:49 +0000 (11:20 +0000)]
Renames variables in advanced optimiser to match others.
Jakub Pawlowicz [Thu, 23 Oct 2014 21:46:21 +0000 (22:46 +0100)]
Reworks simple & advanced optimisations to use metadata.
* We can avoid merging, splitting, and mapping by using token metadata directly.
* Unfortunately it means metadata has to be updated as we go.
Jakub Pawlowicz [Thu, 23 Oct 2014 07:01:22 +0000 (08:01 +0100)]
Adds a more performant version of rebuilder.
Jakub Pawlowicz [Wed, 22 Oct 2014 21:24:24 +0000 (22:24 +0100)]
Rewrites property tokenizer to use string traversing.
Jakub Pawlowicz [Tue, 21 Oct 2014 08:16:06 +0000 (09:16 +0100)]
Adds more advanced tokenizing.
* We'll be able to hold more information about tokens now.
Jakub Pawlowicz [Fri, 17 Oct 2014 21:31:37 +0000 (22:31 +0100)]
Adds an option to store escaped metadata to UrlsProcessor.
Jakub Pawlowicz [Fri, 17 Oct 2014 21:26:07 +0000 (22:26 +0100)]
Adds an option to store escaped metadata to FreeTextProcessor.
Jakub Pawlowicz [Thu, 16 Oct 2014 18:36:35 +0000 (19:36 +0100)]
Adds an option to store escaped metadata to ExpressionsProcessor.
Jakub Pawlowicz [Thu, 16 Oct 2014 18:27:36 +0000 (19:27 +0100)]
Adds an option to store escaped metadata to CommentsProcessor.
Jakub Pawlowicz [Thu, 16 Oct 2014 18:26:43 +0000 (19:26 +0100)]
Tweaks EscapeStore to restore based on index not metadata.
Jakub Pawlowicz [Fri, 5 Dec 2014 23:10:52 +0000 (23:10 +0000)]
Fixes #395 - unescaped brackets in data URIs.
Jakub Pawlowicz [Tue, 2 Dec 2014 20:58:03 +0000 (20:58 +0000)]
Merge pull request #392 from silverwind/pseudo-class-merge
Exclude all problematic pseudo-classes from rule-merging
silverwind [Tue, 2 Dec 2014 19:15:41 +0000 (20:15 +0100)]
Fixes #390 - Update regexes for :first and :dir()
silverwind [Mon, 1 Dec 2014 18:14:24 +0000 (19:14 +0100)]
Fixes #390 - Exclude all problematic pseudo-classes from rule merge
silverwind [Sun, 30 Nov 2014 23:22:56 +0000 (00:22 +0100)]
Fixes #390 - Merging of :fullscreen rules
Jakub Pawlowicz [Sat, 29 Nov 2014 00:13:14 +0000 (00:13 +0000)]
Fixes options coercing in API.
* Apparently it was introduced when renaming options in 3.0.
Jakub Pawlowicz [Sun, 23 Nov 2014 11:11:12 +0000 (11:11 +0000)]
Adds support for @conter-style at-rule.
Jakub Pawlowicz [Thu, 20 Nov 2014 23:14:00 +0000 (23:14 +0000)]
Fixes #385 - edge cases in processing cut off CSS content.
Jakub Pawlowicz [Mon, 17 Nov 2014 19:58:06 +0000 (19:58 +0000)]
Fixes #383 - decimal places and rounding.
* Introduced by #380. Should fix it for good.
Jakub Pawlowicz [Sun, 16 Nov 2014 10:39:13 +0000 (10:39 +0000)]
Merge pull request #382 from XhmikosR/master
Bump nock to v0.50.x.
XhmikosR [Sat, 15 Nov 2014 08:17:40 +0000 (10:17 +0200)]
Bump nock to v0.50.x.
Jakub Pawlowicz [Wed, 12 Nov 2014 09:32:33 +0000 (09:32 +0000)]
Merge pull request #381 from XhmikosR/master
Update dependencies.
XhmikosR [Tue, 11 Nov 2014 13:22:21 +0000 (15:22 +0200)]
Update dependencies.
Jakub Pawlowicz [Sun, 9 Nov 2014 16:54:39 +0000 (16:54 +0000)]
Fixes #380 - rounding fractions to a whole number.
Jakub Pawlowicz [Mon, 20 Oct 2014 19:15:27 +0000 (20:15 +0100)]
Fixes #363 - `rem` units overriding more understandable ones.
Lukas Böcker [Wed, 15 Oct 2014 14:10:46 +0000 (16:10 +0200)]
Allows disabling rounding precision.
* Use `roundingPrecision: -1` or `--rounding-precision \\-1`.
Jakub Pawlowicz [Wed, 15 Oct 2014 21:05:19 +0000 (22:05 +0100)]
Fixes #344 - merging background-size into shorthand.
* Adds properties.backgroundSizeMerging to control the behaviour.
Jakub Pawlowicz [Tue, 14 Oct 2014 07:09:07 +0000 (08:09 +0100)]
Adds more granular control over compatibility settings.
* Manages compatibility options as a hash of options.
* Handles fallback to previous compatibility options.
Jakub Pawlowicz [Sun, 12 Oct 2014 15:33:06 +0000 (16:33 +0100)]
Merge pull request #368 from XhmikosR/master
README.md: use master branch for the Travis CI badge.
Jakub Pawlowicz [Sun, 12 Oct 2014 15:21:22 +0000 (16:21 +0100)]
Replaces remaining references to line breaks with require('os').EOL.
* Thanks @XhmikosR!
Jakub Pawlowicz [Sun, 12 Oct 2014 15:14:38 +0000 (16:14 +0100)]
Fixes comments processor on non-*nix systems.
* Windows, I'm looking at you!
Jakub Pawlowicz [Sun, 12 Oct 2014 09:39:41 +0000 (10:39 +0100)]
Removes support for node.js 0.8.x.
* Although 0.12 is not ready yet, support for 0.8 among libraries is waning.
* Bumps browserify dev dependency to 6.x.
* Bumps nock dev dependency to 0.48.
XhmikosR [Sat, 11 Oct 2014 06:21:31 +0000 (09:21 +0300)]
README.md: use master branch for the Travis CI badge.
Jakub Pawlowicz [Fri, 10 Oct 2014 21:08:37 +0000 (22:08 +0100)]
Fixes specs under latest 0.11.
Jakub Pawlowicz [Fri, 10 Oct 2014 20:48:56 +0000 (21:48 +0100)]
Adds 3.0 release warning to docs.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:47:20 +0000 (07:47 +0100)]
Simplifies `SelectorsOptimizer` instantiation.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:45:56 +0000 (07:45 +0100)]
Renames `noRebase` option into `rebase`.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:35:33 +0000 (07:35 +0100)]
Renames `noAggressiveMerging` option into `aggressiveMerging`.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:30:00 +0000 (07:30 +0100)]
Adds missing entry to Readme about broken module compatibility.
* see
3f1e064c91474ff9bd45ea39b11bc7bd564125c6.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:29:07 +0000 (07:29 +0100)]
Renames `noAdvanced` option into `advanced`.
Jakub Pawlowicz [Fri, 10 Oct 2014 06:17:07 +0000 (07:17 +0100)]
Improves handling & documentation of minification options.
Jakub Pawlowicz [Thu, 9 Oct 2014 19:48:02 +0000 (20:48 +0100)]
Updates changelog after reworked minification.
Jakub Pawlowicz [Thu, 9 Oct 2014 06:15:07 +0000 (07:15 +0100)]
Speeds up advanced processing by shortening optimize loop.
* As it seems we only need 2 extra passes from #removeDuplicates and #mergeAdjacent.
Jakub Pawlowicz [Mon, 6 Oct 2014 20:28:50 +0000 (21:28 +0100)]
Reverses boolean passed to property optimizer.
Jakub Pawlowicz [Mon, 6 Oct 2014 17:23:29 +0000 (18:23 +0100)]
Removes unnecessary libraries.
Jakub Pawlowicz [Mon, 6 Oct 2014 14:45:53 +0000 (15:45 +0100)]
Simplifies advanced processing & property optimizer interface.
* Previously property optimizer accepted a string with selectors & returned a similar list.
* Since advanced optimizer operates on arrays now so does property optimizer.
Jakub Pawlowicz [Mon, 6 Oct 2014 13:42:12 +0000 (14:42 +0100)]
Removes property optimizer from simple optimizations.
Jakub Pawlowicz [Mon, 6 Oct 2014 11:17:03 +0000 (12:17 +0100)]
Speeds up minifying zero values.
* Checks if zeros are present in property value before proceeding.
Jakub Pawlowicz [Mon, 6 Oct 2014 11:07:16 +0000 (12:07 +0100)]
Speeds up clean up operations.
* Removes function from loop.
* Runs optimizations only if needed.
Jakub Pawlowicz [Mon, 6 Oct 2014 09:35:48 +0000 (10:35 +0100)]
Rewrites optimizer's #rebuild as a simple loop.
Jakub Pawlowicz [Sun, 5 Oct 2014 18:36:08 +0000 (19:36 +0100)]
Removes extra trim from clean up code.
Jakub Pawlowicz [Sun, 5 Oct 2014 14:43:44 +0000 (15:43 +0100)]
Speeds up simple reduction by using for loop not map.
Jakub Pawlowicz [Sun, 5 Oct 2014 14:39:38 +0000 (15:39 +0100)]
Speeds up precision minification.
* Caches minification regexp.
* Skips minification if no decimal dots in value.
Jakub Pawlowicz [Sun, 5 Oct 2014 14:16:50 +0000 (15:16 +0100)]
Speeds up unit minification by caching regexp.
Jakub Pawlowicz [Sun, 5 Oct 2014 14:02:43 +0000 (15:02 +0100)]
Speeds up hex name shortener even futher.
* Skips running hex -> name shortener if there are no hex colors.
* Simplifies toName regexp.
Jakub Pawlowicz [Sat, 4 Oct 2014 23:30:45 +0000 (00:30 +0100)]
Speeds up HexNameShortener.
* Moves regex creation out of loop.
* Makes #shorten a simple function.
Jakub Pawlowicz [Sat, 4 Oct 2014 22:56:48 +0000 (23:56 +0100)]
Adds faster tokenizer extraction.
Jakub Pawlowicz [Sat, 4 Oct 2014 09:33:40 +0000 (10:33 +0100)]
Fixes remaining specs (we are green now!).
Jakub Pawlowicz [Sat, 4 Oct 2014 09:32:09 +0000 (10:32 +0100)]
Fixes advanced optimizer.
* It was broken since we use tokenized data now.
Jakub Pawlowicz [Fri, 3 Oct 2014 16:39:24 +0000 (17:39 +0100)]
Fixes tokenizer to split over commas correctly.
Jakub Pawlowicz [Thu, 2 Oct 2014 14:49:06 +0000 (15:49 +0100)]
Fixes tokenizing escaped content within selectors.
Jakub Pawlowicz [Thu, 2 Oct 2014 13:55:17 +0000 (14:55 +0100)]
Fixes rebuilding flat blocks in SelectorOptimizer.
Jakub Pawlowicz [Wed, 1 Oct 2014 09:59:35 +0000 (10:59 +0100)]
Adds value & charset optimizations.
* Re-implemented most of property values' minifications.
* Extra charset(s) are stripped and first one is moved to the beginning.
Jakub Pawlowicz [Mon, 29 Sep 2014 12:01:20 +0000 (13:01 +0100)]
Improves selector optimizer.
* Turns to prototypal OO.
* Adds specs.
* Extracts Simple & Advanced optimizers into separate modules.
* Adds nasty workarounds as property optimizer is incompatible with new tokenizer output.
Jakub Pawlowicz [Sun, 28 Sep 2014 21:36:27 +0000 (22:36 +0100)]
Improves Tokenizer.
* Adds prototypal OO.
* Adds specs.
* Adds stripping some whitespace from selectors and properties.
Jakub Pawlowicz [Fri, 26 Sep 2014 16:14:28 +0000 (17:14 +0100)]
Restores SelectorsOptimizer in minification.
Jakub Pawlowicz [Fri, 26 Sep 2014 15:47:37 +0000 (16:47 +0100)]
Further simplifies CleanCSS#minify by extracting debug options.
Jakub Pawlowicz [Fri, 26 Sep 2014 15:15:48 +0000 (16:15 +0100)]
Simplifies CleanCSS#minify method.
* All processing is now done through content processors with predicatable API.
* Benchmarking also got easier because of that.
Jakub Pawlowicz [Fri, 26 Sep 2014 14:58:11 +0000 (15:58 +0100)]
Removes duplicate stats statement.
Jakub Pawlowicz [Thu, 18 Sep 2014 07:44:42 +0000 (09:44 +0200)]
Strips main clean.js transforms to bare minimum.
Jakub Pawlowicz [Fri, 26 Sep 2014 14:23:40 +0000 (15:23 +0100)]
Removes EmptyRemoval as no longer needed.
Jakub Pawlowicz [Fri, 26 Sep 2014 11:49:10 +0000 (12:49 +0100)]
Moves QuoteScanner to lib/utils.