From 5de4edfa05d54938d8aa92079e83fbe2eac48144 Mon Sep 17 00:00:00 2001 From: David Yan Date: Mon, 28 Dec 2015 00:12:25 -0800 Subject: [PATCH 1/3] Fixed the gemnasium badge to use svg instead of png --- README.md | 2 +- README.ru.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d8aa2dc12..9adf7667c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ logo -## SVGO [![NPM version](https://badge.fury.io/js/svgo.svg)](https://npmjs.org/package/svgo) [![Dependency Status](https://gemnasium.com/svg/svgo.png)](https://gemnasium.com/svg/svgo) [![Build Status](https://secure.travis-ci.org/svg/svgo.svg)](https://travis-ci.org/svg/svgo) [![Coverage Status](https://img.shields.io/coveralls/svg/svgo.svg)](https://coveralls.io/r/svg/svgo?branch=master) +## SVGO [![NPM version](https://badge.fury.io/js/svgo.svg)](https://npmjs.org/package/svgo) [![Dependency Status](https://gemnasium.com/svg/svgo.svg)](https://gemnasium.com/svg/svgo) [![Build Status](https://secure.travis-ci.org/svg/svgo.svg)](https://travis-ci.org/svg/svgo) [![Coverage Status](https://img.shields.io/coveralls/svg/svgo.svg)](https://coveralls.io/r/svg/svgo?branch=master) **SVG O**ptimizer is a Nodejs-based tool for optimizing SVG vector graphics files. ![](https://mc.yandex.ru/watch/18431326) diff --git a/README.ru.md b/README.ru.md index d3942145e..9bc292900 100644 --- a/README.ru.md +++ b/README.ru.md @@ -3,7 +3,7 @@ logo -## SVGO [![NPM version](https://badge.fury.io/js/svgo.svg)](https://npmjs.org/package/svgo) [![Dependency Status](https://gemnasium.com/svg/svgo.png)](https://gemnasium.com/svg/svgo) [![Build Status](https://secure.travis-ci.org/svg/svgo.svg)](https://travis-ci.org/svg/svgo) [![Coverage Status](https://img.shields.io/coveralls/svg/svgo.svg)](https://coveralls.io/r/svg/svgo?branch=master) +## SVGO [![NPM version](https://badge.fury.io/js/svgo.svg)](https://npmjs.org/package/svgo) [![Dependency Status](https://gemnasium.com/svg/svgo.svg)](https://gemnasium.com/svg/svgo) [![Build Status](https://secure.travis-ci.org/svg/svgo.svg)](https://travis-ci.org/svg/svgo) [![Coverage Status](https://img.shields.io/coveralls/svg/svgo.svg)](https://coveralls.io/r/svg/svgo?branch=master) **SVG** **O**ptimizer – это инструмент для оптимизации векторной графики в формате SVG, написанный на Node.js. ![](https://mc.yandex.ru/watch/18431326) From 573d865d010f99d583639fd805fe2594fd3bdc39 Mon Sep 17 00:00:00 2001 From: David Yan Date: Mon, 28 Dec 2015 00:22:09 -0800 Subject: [PATCH 2/3] Fixed a minor grammatical error in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9adf7667c..c9688fe3a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## Why? -SVG files, especially exported from various editors, usually contains a lot of redundant and useless information such as editor metadata, comments, hidden elements, default or non-optimal values and other stuff that can be safely removed or converted without affecting SVG rendering result. +SVG files, especially exported from various editors, usually contain a lot of redundant and useless information such as editor metadata, comments, hidden elements, default or non-optimal values and other stuff that can be safely removed or converted without affecting SVG rendering result. ## What it can do From 3f6cddbb2b0e9ff560302aa0dce9d27ca5ccc10c Mon Sep 17 00:00:00 2001 From: David Yan Date: Mon, 28 Dec 2015 01:11:57 -0800 Subject: [PATCH 3/3] Fixes #464 by outputting the version to stdout instead of letting coa send it to stderr --- lib/svgo/coa.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/svgo/coa.js b/lib/svgo/coa.js index d706ad6a5..026e7fa73 100644 --- a/lib/svgo/coa.js +++ b/lib/svgo/coa.js @@ -28,7 +28,10 @@ module.exports = require('coa').Cmd() .only() .flag() .act(function() { - return PKG.version; + // output the version to stdout instead of stderr if returned + process.stdout.write(PKG.version + '\n'); + // coa will run `.toString` on the returned value and send it to stderr + return ''; }) .end() .opt()