svgicons2svgfont
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "svgicons2svgfont", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Read a set of SVG icons and ouput a SVG font", | ||
@@ -8,3 +8,5 @@ "homepage": "https://github.com/nfroidure/svgicons2svgfont", | ||
"scripts": { | ||
"test": "mocha tests/*.mocha.js" | ||
"test": "node_modules/mocha/bin/mocha tests/*.mocha.js", | ||
"coveralls": "./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha --report lcovonly -- tests/*.mocha.js -R spec -t 5000 && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", | ||
"cover": "./node_modules/istanbul/lib/cli.js cover --report html ./node_modules/mocha/bin/_mocha -- tests/*.mocha.js -R spec -t 5000" | ||
}, | ||
@@ -22,9 +24,13 @@ "repository": { | ||
], | ||
"dependencies": { | ||
"sax": "0.5.x", | ||
"svg-pathdata": "0.0.3" | ||
}, | ||
"devDependencies": { | ||
"mocha": "1.x.x" | ||
}, | ||
"dependencies": { | ||
"sax": "0.5.x", | ||
"svg-pathdata": "0.0.3" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~1.17.1", | ||
"mocha-lcov-reporter": "0.0.1", | ||
"coveralls": "~2.8.0", | ||
"istanbul": "~0.2.4", | ||
"sax": "~0.6.0" | ||
}, | ||
"author": { | ||
@@ -45,4 +51,4 @@ "name": "Nicolas Froidure", | ||
"bin": { | ||
"svgicons2svgfont" : "bin/svgicons2svgfont.js" | ||
"svgicons2svgfont": "bin/svgicons2svgfont.js" | ||
} | ||
} |
@@ -1,4 +0,5 @@ | ||
# svgicons2svgfont [![Build Status](https://travis-ci.org/nfroidure/svgicons2svgfont.png?branch=master)](https://travis-ci.org/nfroidure/svgicons2svgfont) | ||
# svgicons2svgfont | ||
> svgicons2svgfont is a simple tool to merge multiple icons to an SVG font. | ||
svgicons2svgfont is a simple tool to merge multiple icons to an SVG font. | ||
[![NPM version](https://badge.fury.io/js/svgicons2svgfont.png)](https://npmjs.org/package/svgicons2svgfont) [![Build status](https://secure.travis-ci.org/nfroidure/svgicons2svgfont.png)](https://travis-ci.org/nfroidure/svgicons2svgfont) [![Dependency Status](https://david-dm.org/nfroidure/svgicons2svgfont.png)](https://david-dm.org/nfroidure/svgicons2svgfont) [![devDependency Status](https://david-dm.org/nfroidure/svgicons2svgfont/dev-status.png)](https://david-dm.org/nfroidure/svgicons2svgfont#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/nfroidure/svgicons2svgfont/badge.png?branch=master)](https://coveralls.io/r/nfroidure/svgicons2svgfont?branch=master) | ||
@@ -5,0 +6,0 @@ 'rect', 'line', 'circle', 'ellipsis', 'polyline' and 'polygon' shapes will be |
@@ -30,6 +30,14 @@ /* | ||
// Parsing each icons asynchronously | ||
var saxStream = Sax.createStream(true); | ||
var saxStream = Sax.createStream(true) | ||
, parents = [] | ||
; | ||
saxStream.on('closetag', function(tag) { | ||
parents.pop(); | ||
}); | ||
saxStream.on('opentag', function(tag) { | ||
if(tag.attributes.display | ||
&& 'none' == tag.attributes.display.toLowerCase()) { | ||
parents.push(tag); | ||
if(parents.some(function(tag) { | ||
return tag.attributes.display | ||
&& 'none' == tag.attributes.display.toLowerCase(); | ||
})) { | ||
return; | ||
@@ -36,0 +44,0 @@ } |
@@ -104,3 +104,3 @@ var assert = require('assert') | ||
it.only("should work with real world icons", function(done) { | ||
it("should work with real world icons", function(done) { | ||
generateFontToFile({ | ||
@@ -107,0 +107,0 @@ fontName: 'realicons' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91953
56
391
60
5