Skip to content

Commit

Permalink
Version 0.5.0
Browse files Browse the repository at this point in the history
Updated dependencies (thanks to @shinnn for bringing attention) and readme.
  • Loading branch information
GreLI committed Nov 4, 2014
1 parent e0cf169 commit 0d5ce7d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
### [ [>](https://github.com/svg/svgo/tree/v0.4.5) ] 0.4.5 / 02.02.2014
### [ [>](https://github.com/svg/svgo/tree/v0.4.5) ] 0.5.0 / 05.11.2014
* added ``--multipass`` command line option which repeatedly applies optimizations like collapsing groups (by @dfilatov)
* exposed JSAPI as a factory method (by @mistakster)
* added removeDesc plugin (by @dwabyick), disabled by default
* [removeUselessStrokeAndFill](https://github.com/svg/svgo/blob/master/plugins/removeUselessStrokeAndFill) plugin is disabled by default since it's unable to check inherited properties
* transformations now apply to paths with arcs in [plugins/convertPathData](https://github.com/svg/svgo/blob/master/plugins/convertPathData.js)
* a lot of bug fixes mostly related to transformations

### [ [>](https://github.com/svg/svgo/tree/v0.4.5) ] 0.4.5 / 02.08.2014
* significally improved plugin [plugins/convertPathData](https://github.com/svg/svgo/blob/master/plugins/convertPathData.js):
- Now data is being written relative or absolute whichever is shorter. You can turn it off by setting ``utilizeAbsolute`` to ``false``.
- Smarter rounding: values like 2.499 now rounds to 2.5. Rounding now takes in account accumulutive error meaning that points will not be misplaced due to rounding more than it neccessary.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Today we have:
* [ [>](https://github.com/svg/svgo/blob/master/plugins/convertTransform.js) ] collapse multiple transforms into one, convert matrices to the short aliases and much more
* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeUnknownsAndDefaults.js) ] remove unknown elements content and attributes, remove attrs with default values
* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeNonInheritableGroupAttrs.js) ] remove non-inheritable group's "presentation" attributes
* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeUselessStrokeAndFill.js) ] remove useless stroke and fill attrs.
* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeUselessStrokeAndFill.js) ] remove useless stroke and fill attrs (disabled by default)
* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeUnusedNS.js) ] remove unused namespaces declaration
* [ [>](https://github.com/svg/svgo/blob/master/plugins/cleanupIDs.js) ] remove unused and minify used IDs
* [ [>](https://github.com/svg/svgo/blob/master/plugins/cleanupNumericValues.js) ] round numeric values to the fixed precision, remove default 'px' units
Expand Down
1 change: 1 addition & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ SVGO имеет расширяемую архитектуру, в которой
* [ [>](https://github.com/svg/svgo/blob/master/plugins/convertTransform.js) ] схлопывание нескольких трансформаций в одну, конвертирование матриц в короткие алиасы и многое другое
* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeUnknownsAndDefaults.js) ] удаление неизвестных элементов, контента и атрибутов
* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeNonInheritableGroupAttrs.js) ] удаление ненаследуемых "презентационных" атрибутов групп
* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeUselessStrokeAndFill.js) ] удаление неиспользуемых атрибутов stroke-* и fill-* (выключено по умолчанию)
* [ [>](https://github.com/svg/svgo/blob/master/plugins/removeUnusedNS.js) ] удаление деклараций неиспользуемых пространств имён
* [ [>](https://github.com/svg/svgo/blob/master/plugins/cleanupIDs.js) ] удаление неиспользуемых и сокращение используемых ID
* [ [>](https://github.com/svg/svgo/blob/master/plugins/cleanupNumericValues.js) ] округление дробных чисел до заданной точности, удаление `px` как единицы измерения по-умолчанию
Expand Down
10 changes: 7 additions & 3 deletions lib/svgo/coa.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';

require('colors');
require('js-yaml');

var FS = require('fs'),
PATH = require('path'),
UTIL = require('util'),
SVGO = require('../svgo'),
YAML = require('js-yaml'),
PKG = require('../../package.json'),
encodeSVGDatauri = require('./tools').encodeSVGDatauri,
decodeSVGDatauri = require('./tools').decodeSVGDatauri,
Expand Down Expand Up @@ -126,7 +126,11 @@ module.exports = require('coa').Cmd()

// external file
} else {
config = require(PATH.resolve(opts.config));
try {
config = require(PATH.resolve(opts.config));
} catch (e) {
config = YAML.safeLoad(FS.readFileSync(PATH.resolve(opts.config), 'utf8'));
}
}

}
Expand Down Expand Up @@ -439,7 +443,7 @@ function optimizeFolder(path, config) {
}
//move on to the next file
else if (++i < files.length) {
optimizeFile(files[i]);
optimizeFile(files[i]);
}


Expand Down
4 changes: 2 additions & 2 deletions lib/svgo/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var FS = require('fs');
var yaml = require('js-yaml');
var fs = require('fs');

var EXTEND = require('whet.extend');

Expand Down Expand Up @@ -29,7 +29,7 @@ module.exports = function(config) {

} else {

defaults = EXTEND({}, yaml.safeLoad(fs.readFileSync(__dirname + '/../../.svgo.yml', 'utf8')));
defaults = EXTEND({}, yaml.safeLoad(FS.readFileSync(__dirname + '/../../.svgo.yml', 'utf8')));

defaults.plugins = preparePluginsArray(defaults.plugins);

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svgo",
"version": "0.4.5",
"version": "0.5.0",
"description": "Nodejs-based tool for optimizing SVG vector graphics files",
"keywords": [ "svgo", "svg", "optimize", "minify" ],
"homepage": "https://github.com/svg/svgo",
Expand Down Expand Up @@ -40,17 +40,17 @@
},
"dependencies": {
"sax": "~0.6.0",
"coa": "~0.4.0",
"coa": "~0.4.1",
"js-yaml": "~3.2.2",
"colors": "~0.6.0",
"colors": "~1.0.3",
"whet.extend": "~0.9.9"
},
"devDependencies": {
"mocha": "~1.14.0",
"should": "~2.1.0",
"istanbul": "~0.2.0",
"mocha": "~2.0.1",
"should": "~4.1.0",
"istanbul": "~0.3.2",
"mocha-istanbul": "~0.2.0",
"coveralls": "~2.11.1"
"coveralls": "~2.11.2"
},
"engines": {
"node": ">=0.8.0"
Expand Down

0 comments on commit 0d5ce7d

Please sign in to comment.