207 Commits

Author SHA1 Message Date
Matthias Mullie
bf87a5cdc2 Combine imports/import files earlier
If we wait until after adjusting the paths relative to the new
target, we may fail to import them because the path they'll be
relative to may not yet exist.

If we do it after moving path
1.3.31
2016-01-06 17:18:37 -08:00
Matthias Mullie
3da112a6a3 Create target dir for tests, it's required to resolve path 2016-01-06 17:10:31 -08:00
Matthias Mullie
13641aee3c php-cs-fixer fixes 2016-01-06 16:44:12 -08:00
Matthias Mullie
5612427e40 Add tests for symlinked folders 2016-01-06 16:38:59 -08:00
Matthias Mullie
a39e04c6ea Fix symlink tests 2016-01-06 15:11:54 -08:00
Matthias Mullie
0cd5108683 Add tests for symlinked files
Fixes #77
1.3.30
2016-01-04 23:43:18 -08:00
Matthias Mullie
791e81a529 Use more sensible test CSS 2016-01-04 15:57:15 -08:00
Matthias Mullie
31371a6a67 Strip empty else-statements
Fixes #91
2016-01-04 14:59:19 -08:00
Matthias Mullie
1e59ad8119 Use php-coveralls version that supports PHP5.3
There's no great reason to stop supporting PHP5.3 in this project
(other than PHP no longer supporting that version), so might as
well keep supporting it until there is a good reason to stop doing so.
2016-01-04 14:30:50 -08:00
Matthias Mullie
72c862d141 Improve check for invalid (too long) paths (which are likely content)
Fixes #90
2016-01-04 14:22:38 -08:00
Matthew Leffler
dfba87f950 Use better test character for non-file path 2016-01-04 14:22:33 -08:00
Matthew Leffler
d384e5be6a Duh 2016-01-04 14:22:27 -08:00
Matthew Leffler
ed15a34066 Prevent error determining if path or content
Previously the following error was thrown when passing `$data` over the filesystem file name limit:

```
file_exists(): File name is longer than the maximum allowed path length on this platform
```
2016-01-04 14:22:20 -08:00
Matthias Mullie
f394a878f0 Ignore non-essential files 2015-12-21 09:42:16 +01:00
Matthias Mullie
58fa692aef Stop testing 5.3 on Travis, it no longer supports it 1.3.29 2015-12-17 22:38:16 +01:00
Matthias Mullie
967a18a7a0 Upgrade phpunit version 2015-12-17 22:37:46 +01:00
Matthias Mullie
da03f6d13c Don't strip double simicolons inside for
Fixes issue #89
2015-12-17 22:35:42 +01:00
Matthias Mullie
cecee1ce5b Update non-composer usage instructions 2015-11-19 15:17:35 +01:00
Matthias Mullie
a1e9988195 Add test for issue #74 2015-09-21 21:21:48 +02:00
Matthias Mullie
9004585177 Don't swallow entire tags when stripping empties
Whenever an empty tag was found, everything before it risked
being eaten because I wasn't strict enough about the characters
allowed. Crossing `{` can not be allowed.

Fixes #67
2015-09-08 12:41:15 +02:00
Matthias Mullie
95fc32a419 Fix violations according to SensioLabsInsight 2015-09-08 10:46:06 +02:00
Matthias Mullie
4a9b888547 Remove empty CSS tags
Fixes #67
2015-09-07 21:47:22 +02:00
Matthias Mullie
44cbb9c0f5 Add test for issue #66 2015-09-07 21:35:28 +02:00
Matthias Mullie
9ddb7bbdbf Merge branch 'kaittodesk-master' 2015-09-07 21:28:43 +02:00
Matthias Mullie
fe80dc7657 Alternative double-semicolon removal fix
Previous one didn't sufficiently remove double semicolons.
This one should be too eager, but then restore them if they
were valid in a for loop.

Fixes #70
2015-09-07 21:26:29 +02:00
Kait Todesk
f2f072ad54 Preserve for-loop semicolons when 2nd statement is empty 2015-09-07 12:05:27 +03:00
Matthias Mullie
bdbb91277b php-cs-fixer 2015-09-05 21:49:18 +02:00
Matthias Mullie
3b0110167d Merge pull request #69 from interpotential/move-external-imports
Move external imports
2015-09-05 21:44:00 +02:00
Wouter M. van Vliet
2861a4a27b Comply with coding standards 2015-09-05 20:16:49 +02:00
Wouter M. van Vliet
e932dbf4ee Merge remote-tracking branch 'upstream/master' into move-external-imports 2015-09-05 20:15:28 +02:00
Matthias Mullie
c1b61592f4 Update cache repo location 2015-09-04 11:02:35 +02:00
Wouter M. van Vliet
782ea423e4 Add test for fixed issue 2015-09-02 17:33:56 +02:00
Wouter M. van Vliet
28f4ff730e Move remaining @import statements to the top 2015-09-02 17:15:41 +02:00
Matthias Mullie
7fc36687ec Strip some more leading & trailing zeroes 2015-08-25 14:56:09 +02:00
Matthias Mullie
3575143b4f Don't strip all units for 0-values
Looks like webkit (especially Safari) doesn't properly handle
0% being 0.
Also had to rewrite some regexes because they should now assume
there may still be a unit.

Fixes issue #60
2015-08-25 14:43:30 +02:00
Matthias Mullie
85e6b85ecb Add some more embeddable data types 2015-08-25 09:37:38 +02:00
Matthias Mullie
ca88512003 Speed up regex extraction
Previous commit of splitting into 2 regexes made no
sense. It seemed slightly faster in a small file, but
with large input, minification time almost doubled.
2015-08-25 09:36:09 +02:00
Matthias Mullie
df7c57ac98 Improve speed of regex extraction
Meanwhile also improved docs
2015-08-20 18:24:14 +02:00
Matthias Mullie
2cee254419 Merge pull request #62 from EkkoSense/master
Allow URL-rewriting without saving the minified content to the file system
1.3.28
2015-08-20 16:49:37 +02:00
Matthias Mullie
c7dcdc4934 Add test for issue #64 2015-08-20 16:32:14 +02:00
Chris Throup
d7bb032311 Change access level for Minify::execute() from protected to public. This allows url-rewriting without saving the minified content to the file system.
Fixes issue #61
2015-08-20 15:32:11 +01:00
Matthias Mullie
ea809e7d06 Improve string-extraction regex
Fixes bug #58
2015-08-20 16:09:10 +02:00
Matthias Mullie
c37967744d Recognize regular expressions after reserved words
Fixes issue #59
2015-08-19 16:48:35 +02:00
Matthias Mullie
76cf88faaa Add test for issue #58 2015-08-19 16:20:20 +02:00
Matthias Mullie
4cf2880e51 Preserve newline immediately after regex
Fixes issue #56
2015-08-19 16:05:08 +02:00
Chris Throup
a463c4e36d Allow URL-rewriting without saving the minified content to the file system.
Fixes issue #61
2015-08-12 13:55:46 +01:00
Matthias Mullie
5497bea3d1 Don't collapse line feeds after "return"
return is not guaranteed to be followed by a return value.
It could just be "return", followed by nothing (void return),
not even a semicolon, just line feed (ASI)
Whatever is next could, for example, be another operator.
We may just need ASI to kick in there, so keep the line feed
after return.

Fixes issue #54
1.3.27
2015-06-29 17:51:16 +02:00
Matthias Mullie
894928f067 Add test case for issue #53 2015-06-29 17:51:00 +02:00
Matthias Mullie
f1005c6918 Link to issue explaining how to use without composer
Fixes #48
2015-06-02 13:27:21 +02:00
Matthias Mullie
15e564ff49 Fix relative target path tests 1.3.26 2015-05-13 18:03:46 +02:00