Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsweet committed Apr 15, 2013
2 parents 0f62051 + 1dd57ca commit 97dbac5
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[GNUmakefile]
[Makefile]
indent_style = tab

[package.json]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules/
lib-cov/
html-report/
lcov.info
bin/svgo-profiling
*.sublime-*
*.log
Expand Down
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ node_js:
- 0.10
- 0.11

branches:
only:
- master
matrix:
allow_failures:
- node_js: 0.11

branches:
only:
- master

matrix:
allow_failures:
- node_js: 0.11
script: make travis
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
test:
@NODE_ENV=test ./node_modules/.bin/mocha

lib-cov:
@./node_modules/.bin/istanbul instrument --output lib-cov --no-compact --variable global.__coverage__ lib

coverage: lib-cov
@COVERAGE=1 ISTANBUL_REPORTERS=text-summary ./node_modules/.bin/mocha --reporter mocha-istanbul
@rm -rf lib-cov

coveralls: lib-cov
@COVERAGE=1 ISTANBUL_REPORTERS=lcovonly ./node_modules/.bin/mocha --reporter mocha-istanbul
@cat lcov.info | ./node_modules/.bin/coveralls
@rm -rf lib-cov lcov.info

travis: test coveralls

jshint:
@jshint --show-non-errors .

.PHONY: test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<img src="http://soulshine.in/svgo.svg" width="200" height="200" alt="logo"/>

## SVGO v0.3.1 [![Build Status](https://secure.travis-ci.org/svg/svgo.png)](http://travis-ci.org/svg/svgo)
## SVGO [![NPM version](https://badge.fury.io/js/svgo.png)](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.png)](https://travis-ci.org/svg/svgo) [![Coverage Status](https://coveralls.io/repos/svg/svgo/badge.png?branch=master)](https://coveralls.io/r/svg/svgo)

**SVG O**ptimizer is a Nodejs-based tool for optimizing SVG vector graphics files.
![](https://mc.yandex.ru/watch/18431326)
Expand Down
2 changes: 1 addition & 1 deletion README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<img src="http://soulshine.in/svgo.svg" width="200" height="200" alt="logo"/>

## SVGO v0.3.1 [![Build Status](https://secure.travis-ci.org/svg/svgo.png)](http://travis-ci.org/svg/svgo)
## SVGO [![NPM version](https://badge.fury.io/js/svgo.png)](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.png)](https://travis-ci.org/svg/svgo) [![Coverage Status](https://coveralls.io/repos/svg/svgo/badge.png?branch=master)](https://coveralls.io/r/svg/svgo)

**SVG** **O**ptimizer – это инструмент для оптимизации векторной графики в формате SVG, написанный на Node.js.
![](https://mc.yandex.ru/watch/18431326)
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
"example": "./examples"
},
"scripts": {
"test": "./node_modules/.bin/mocha",
"cover": "./node_modules/.bin/istanbul instrument --output lib-cov --no-compact --variable global.__coverage__ lib && ./node_modules/.bin/mocha --reporter mocha-istanbul --recursive",
"jshint": "jshint --show-non-errors ."
"test": "make test"
},
"dependencies": {
"sax": "~0.5.0",
Expand All @@ -47,7 +45,8 @@
"mocha": "~1.9.0",
"should": "~1.2.0",
"istanbul": "~0.1.0",
"mocha-istanbul": ""
"mocha-istanbul": "",
"coveralls": ""
},
"engines": {
"node": ">=0.6.0"
Expand Down
5 changes: 3 additions & 2 deletions test/config/_index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
'use strict';

var cover = process.argv[3] === 'mocha-istanbul',
CONFIG = require(cover ? '../../lib-cov/svgo/config' : '../../lib/svgo/config');
var CONFIG = require(process.env.COVERAGE ?
'../../lib-cov/svgo/config' :
'../../lib/svgo/config');

describe('config', function() {

Expand Down
4 changes: 3 additions & 1 deletion test/plugins/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
var FS = require('fs'),
PATH = require('path'),
regFilename = /^(.*)\.(\d+)\.svg$/,
SVGO = require('../../lib/svgo');
SVGO = require(process.env.COVERAGE ?
'../../lib-cov/svgo':
'../../lib/svgo');

describe('plugins tests', function() {

Expand Down
7 changes: 4 additions & 3 deletions test/svg2js/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
var SHOULD = require('should'),
FS = require('fs'),
PATH = require('path'),
cover = process.argv[3] === 'mocha-istanbul',
svg2js = require(cover ? '../../lib-cov/svgo/svg2js' : '../../lib/svgo/svg2js');
SVG2JS = require(process.env.COVERAGE ?
'../../lib-cov/svgo/svg2js' :
'../../lib/svgo/svg2js');

describe('svg2js', function() {

Expand All @@ -20,7 +21,7 @@ describe('svg2js', function() {
throw err;
}

svg2js(data, function(result) {
SVG2JS(data, function(result) {
root = result;
done();
});
Expand Down

0 comments on commit 97dbac5

Please sign in to comment.