File tree 10 files changed +44
-16
lines changed
10 files changed +44
-16
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ charset = utf-8
9
9
trim_trailing_whitespace = true
10
10
insert_final_newline = true
11
11
12
- [GNUmakefile ]
12
+ [Makefile ]
13
13
indent_style = tab
14
14
15
15
[package.json ]
Original file line number Diff line number Diff line change 1
1
node_modules /
2
2
lib-cov /
3
3
html-report /
4
+ lcov.info
4
5
bin /svgo-profiling
5
6
* .sublime- *
6
7
* .log
Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ node_js:
6
6
- 0.10
7
7
- 0.11
8
8
9
+ matrix :
10
+ allow_failures :
11
+ - node_js : 0.11
12
+
13
+
9
14
branches :
10
15
only :
11
16
- master
12
17
13
- matrix :
14
- allow_failures :
15
- - node_js : 0.11
18
+ script : make travis
Original file line number Diff line number Diff line change
1
+ test :
2
+ @NODE_ENV=test ./node_modules/.bin/mocha
3
+
4
+ lib-cov :
5
+ @./node_modules/.bin/istanbul instrument --output lib-cov --no-compact --variable global.__coverage__ lib
6
+
7
+ coverage : lib-cov
8
+ @COVERAGE=1 ISTANBUL_REPORTERS=text-summary ./node_modules/.bin/mocha --reporter mocha-istanbul
9
+ @rm -rf lib-cov
10
+
11
+ coveralls : lib-cov
12
+ @COVERAGE=1 ISTANBUL_REPORTERS=lcovonly ./node_modules/.bin/mocha --reporter mocha-istanbul
13
+ @cat lcov.info | ./node_modules/.bin/coveralls
14
+ @rm -rf lib-cov lcov.info
15
+
16
+ travis : test coveralls
17
+
18
+ jshint :
19
+ @jshint --show-non-errors .
20
+
21
+ .PHONY : test
Original file line number Diff line number Diff line change 3
3
4
4
<img src =" http://soulshine.in/svgo.svg " width =" 200 " height =" 200 " alt =" logo " />
5
5
6
- ## 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 )] ( http ://travis-ci.org/svg/svgo)
6
+ ## 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)
7
7
8
8
** SVG O** ptimizer is a Nodejs-based tool for optimizing SVG vector graphics files.
9
9
![ ] ( https://mc.yandex.ru/watch/18431326 )
Original file line number Diff line number Diff line change 3
3
4
4
<img src =" http://soulshine.in/svgo.svg " width =" 200 " height =" 200 " alt =" logo " />
5
5
6
- ## 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 )] ( http ://travis-ci.org/svg/svgo)
6
+ ## 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)
7
7
8
8
** SVG** ** O** ptimizer – это инструмент для оптимизации векторной графики в формате SVG, написанный на Node.js.
9
9
![ ] ( https://mc.yandex.ru/watch/18431326 )
Original file line number Diff line number Diff line change 32
32
"example" : " ./examples"
33
33
},
34
34
"scripts" : {
35
- "test" : " ./node_modules/.bin/mocha" ,
36
- "cover" : " ./node_modules/.bin/istanbul instrument --output lib-cov --no-compact --variable global.__coverage__ lib && ./node_modules/.bin/mocha --reporter mocha-istanbul --recursive" ,
37
- "jshint" : " jshint --show-non-errors ."
35
+ "test" : " make test"
38
36
},
39
37
"dependencies" : {
40
38
"sax" : " ~0.5.0" ,
47
45
"mocha" : " ~1.9.0" ,
48
46
"should" : " ~1.2.0" ,
49
47
"istanbul" : " ~0.1.0" ,
50
- "mocha-istanbul" : " "
48
+ "mocha-istanbul" : " " ,
49
+ "coveralls" : " "
51
50
},
52
51
"engines" : {
53
52
"node" : " >=0.6.0"
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var cover = process . argv [ 3 ] === 'mocha-istanbul' ,
4
- CONFIG = require ( cover ? '../../lib-cov/svgo/config' : '../../lib/svgo/config' ) ;
3
+ var CONFIG = require ( process . env . COVERAGE ?
4
+ '../../lib-cov/svgo/config' :
5
+ '../../lib/svgo/config' ) ;
5
6
6
7
describe ( 'config' , function ( ) {
7
8
Original file line number Diff line number Diff line change 3
3
var FS = require ( 'fs' ) ,
4
4
PATH = require ( 'path' ) ,
5
5
regFilename = / ^ ( .* ) \. ( \d + ) \. s v g $ / ,
6
- SVGO = require ( '../../lib/svgo' ) ;
6
+ SVGO = require ( process . env . COVERAGE ?
7
+ '../../lib-cov/svgo' :
8
+ '../../lib/svgo' ) ;
7
9
8
10
describe ( 'plugins tests' , function ( ) {
9
11
Original file line number Diff line number Diff line change 3
3
var SHOULD = require ( 'should' ) ,
4
4
FS = require ( 'fs' ) ,
5
5
PATH = require ( 'path' ) ,
6
- cover = process . argv [ 3 ] === 'mocha-istanbul' ,
7
- svg2js = require ( cover ? '../../lib-cov/svgo/svg2js' : '../../lib/svgo/svg2js' ) ;
6
+ SVG2JS = require ( process . env . COVERAGE ?
7
+ '../../lib-cov/svgo/svg2js' :
8
+ '../../lib/svgo/svg2js' ) ;
8
9
9
10
describe ( 'svg2js' , function ( ) {
10
11
@@ -20,7 +21,7 @@ describe('svg2js', function() {
20
21
throw err ;
21
22
}
22
23
23
- svg2js ( data , function ( result ) {
24
+ SVG2JS ( data , function ( result ) {
24
25
root = result ;
25
26
done ( ) ;
26
27
} ) ;
You can’t perform that action at this time.
0 commit comments