1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-31 07:44:22 +03:00
Commit Graph

298 Commits

Author SHA1 Message Date
dfcc145d5a Fix crash when ‘info’ is absent
Fix #1030
2018-09-17 11:40:20 +03:00
72fa7d335f Sync readme and tty help
Fix #597
2018-09-15 15:02:02 +03:00
62f67dee29 Return the path, so it can be used to overwrite the file with the optimized version 2018-09-15 14:46:45 +03:00
3e2fd44a17 feat: offer ES module interop default export (#934) 2018-09-15 14:44:17 +03:00
e7b8a6ce7d Upgrade css-tree from alpha25 to alpha.28
API changed walkFoo(ast, fun) to walk(ast,{visit: 'Rule',enter: fun)
csstree.translate renamed to csstree.generate
csstree.generate throws an error on invalid style where translate silently ignored it - update style processing to catch and ignore instead
Updated tests - csstree now omits more whitespace
2018-09-15 14:43:28 +03:00
5e376a4b65 Fix missing return in JSAPI#removeAttr method (#855) 2018-09-15 13:58:59 +03:00
828a72a896 fix broken jsapi clone method (#854) 2018-09-15 13:57:47 +03:00
dd2a21fcd2 Fix default plugins initializing
Fixe #852, close #853
2018-09-15 13:52:16 +03:00
73436be45c Update tools.js 2018-03-21 23:02:42 +03:00
efcb07ee65 Avoid extra trailing whitespace in stdout mode
Not only does `console.log()` already print a newline after its output,
but it prints a space between each of its arguments, so including `'\n'`
as a second argument results in a trailing space, then a newline, then
another newline. Excluding this extra `'\n'` results in just one newline
after the data.
2017-11-07 12:17:51 +03:00
7797bbad47 Do not print statistics when using in stdout mode
When using the `stdout` output mode (e.g. using `svgo -` within a
pipeline), the time and optimization statistics shouldn't be printed in
the output stream.
2017-11-07 12:17:51 +03:00
ceccf1ffdc Fix inlineStyles working on foreignObject content. Fixes #823 2017-11-03 13:27:02 +03:00
471aec5e25 Fix #820 (#821)
* Add test for inlineStyles plugin/CSSStyleDeclaration API.

* Adjust test.

* Always initialize element attrs with empty object.
Improve code.
2017-10-31 13:50:20 +03:00
1aa9e9a56a Remove 'recursvie' option as not implemented 2017-10-30 21:21:44 +03:00
91d98106d4 Add prefixIds plugin (#700)
Add prefixIds plugin
2017-10-23 22:14:43 +03:00
d828a62100 Bump dependencies and minor fix for inlineStyles 2017-10-22 22:30:17 +03:00
2523799a12 Add inlineStyles plugin (rewrite of localStyles plugin) (#592)
Add inlineStyles plugin
2017-10-22 21:57:47 +03:00
f2fa7a33be add support for tab indent 2017-10-22 21:19:30 +03:00
f044d259e7 Fix error on empty file, fixes #810 2017-10-22 17:42:57 +03:00
e3ddf1d96a Process *.svg files 2017-09-09 23:56:07 +03:00
114b2cfaf3 fix coa 2017-08-24 00:46:13 +03:00
65a0575d8f config: fix datauri config object name 2017-06-28 15:50:59 -04:00
91a6804cb9 add datauri configuration parameter 2017-06-02 17:34:08 -04:00
51832d4c8a allow datauri option on js api 2017-06-02 17:34:03 -04:00
f35a503752 Resolves #690: Add option to process folders recursively. 2017-05-04 14:10:42 +09:30
d74f6a0e2f Promisify SVGO 2017-03-25 23:46:43 +03:00
4495a34f55 Remove unnecessary dependency 2017-03-22 09:03:51 +03:00
d5896991bd Lint fixes 2017-02-05 19:24:16 +03:00
ece43a3f55 Bump to Node v4 2017-02-05 19:20:13 +03:00
e57ecbd012 Update CLI help
Add the missed possibility to pass a `JSON` string to `--config` argument
2017-01-12 12:37:05 +01:00
a2a0a1ef3f Microoptimize removing space before minus 2016-12-25 18:17:39 +03:00
b6e92f4bb2 Correct leading zero removing in case of exponential notation. Fix #551 2016-12-25 18:17:39 +03:00
1d6c055a81 Merge pull request #546 from gjjones/master
adds addAttributes plugin
2016-08-25 23:34:09 +04:00
e4003b4dd2 Crossplatform work. Fixes #538 2016-08-20 20:39:55 +03:00
6dc5702415 Type checking to avoid implicit conversion on empty strings. 2016-05-07 14:27:13 -04:00
a100c53681 Removes value guard from addAttrs, allows writing valueless attributes. 2016-05-07 14:09:38 -04:00
65efced355 Process “foreignObject”: cleanup editors content and remove itself if is empty.
Remove doctype with entities.
Fixes #533
2016-04-24 21:29:01 +03:00
9f545d2420 Fix default indent 2016-04-05 18:03:36 +03:00
3d8496033c Add option to indent when pretty printing svg 2016-03-26 22:14:29 -05:00
a7624a0c43 Accept number as a value in hasAttrLocal 2016-03-20 12:37:38 +03:00
c3e0eb6b00 Check for "href’ by local name 2016-03-11 13:31:30 +03:00
215cd39c22 minifyStyles: preserve CDATA if needed 2016-03-08 20:35:00 +03:00
5b88dc44dc Style fix 2016-03-08 19:51:24 +03:00
57dc9aedc4 Show plugins list sorted alphabetically 2016-03-08 16:56:02 +03:00
0b23ff63c2 Improvements on parsing error handling. 2016-02-29 01:03:16 +03:00
748756e18d Capture parsing errors, but no further. (Don't break tests.) 2016-02-28 23:09:32 +03:00
77d2a1a300 Merge pull request #503 from MeoMix/patch-3
Use explicit file types
2016-02-23 10:55:18 +03:00
d15c3b22bf Merge pull request #502 from MeoMix/patch-2
Use explicit file types
2016-02-23 10:55:15 +03:00
a61f4b315d Use explicit file types 2016-02-22 21:30:39 -08:00
bf4014223b Use explicit file types 2016-02-22 21:29:47 -08:00