Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-iconfont

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-iconfont - npm Package Compare versions

Comparing version 0.0.3 to 0.0.5

41

package.json
{
"name": "gulp-iconfont",
"version": "0.0.3",
"description": "Create icon fonts from several SVG icons",
"version": "0.0.5",
"homepage": "https://github.com/nfroidure/gulp-iconfont",
"author": {
"name": "Nicolas Froidure",
"url": "http://www.insertafter.com/blog.html"
},
"repository": {
"type": "git",
"url": "git://github.com/nfroidure/gulp-iconfont.git"
},
"bugs": {
"url": "https://github.com/nfroidure/gulp-iconfont/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/nfroidure/gulp-iconfont/blob/master/LICENSE"
}
],
"main": "src/index.js",
"engines": {
"node": ">= 0.10.0"
},
"main": "src/index.js",
"scripts": {
"test": "node_modules/mocha/bin/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"
},

@@ -15,4 +39,2 @@ "keywords": [

],
"author": "Nicolas Froidure",
"license": "MIT",
"dependencies": {

@@ -24,9 +46,12 @@ "gulp-util": "~2.2.0",

"gulp-svgicons2svgfont": "0.0.5",
"duplexer": "~0.1.1"
"plexer": "0.0.1"
},
"devDependencies": {
"event-stream": "~3.0.20",
"mocha": "~1.16.2",
"gulp": "~3.2.4"
"gulp": "~3.2.4",
"mocha": "~1.17.1",
"event-stream": "~3.1.0",
"mocha-lcov-reporter": "0.0.1",
"coveralls": "~2.7.1",
"istanbul": "~0.2.4"
}
}

@@ -1,4 +0,6 @@

# gulp-iconfont [![NPM version](https://badge.fury.io/js/gulp-iconfont.png)](https://npmjs.org/package/gulp-iconfont) [![Build status](https://api.travis-ci.org/nfroidure/gulp-iconfont.png)](https://travis-ci.org/nfroidure/gulp-iconfont)
# gulp-iconfont
> Create a SVG/TTF/EOT/WOFF font from several SVG icons with [Gulp](http://gulpjs.com/).
[![NPM version](https://badge.fury.io/js/gulp-iconfont.png)](https://npmjs.org/package/gulp-iconfont) [![Build status](https://secure.travis-ci.org/nfroidure/gulp-iconfont.png)](https://travis-ci.org/nfroidure/gulp-iconfont) [![Dependency Status](https://david-dm.org/nfroidure/gulp-iconfont.png)](https://david-dm.org/nfroidure/gulp-iconfont) [![devDependency Status](https://david-dm.org/nfroidure/gulp-iconfont/dev-status.png)](https://david-dm.org/nfroidure/gulp-iconfont#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/nfroidure/gulp-iconfont/badge.png?branch=master)](https://coveralls.io/r/nfroidure/gulp-iconfont?branch=master)
You can test this library with the

@@ -32,4 +34,10 @@ [frontend generator](http://nfroidure.github.io/svgiconfont/) before using

`gulp-iconfont` bundles several plugins to bring a simpler API
(`gulp-svgicons2svgfont`, `gulp-svg2tff`, `gulp-ttf2eot`, `gulp-ttf2woff`).
(`gulp-svgicons2svgfont`, `gulp-svg2tff`, `gulp-ttf2eot`, `gulp-ttf2woff`)
for more flexibility, feel free to use them separately.
To use this font in your CSS, you could add a mixin like in this
[real world example](https://github.com/ChtiJS/chtijs.francejs.org/blob/master/documents/less/_icons.less).
You may also want to generate CSS automatically with
[`gulp-iconfont-scss`](https://github.com/backflip/gulp-iconfont-css).
## API

@@ -70,1 +78,2 @@

codepoints.

4

src/index.js
var gutil = require('gulp-util')
, Stream = require('stream')
, duplexer = require('duplexer')
, duplexer = require('plexer')
, svgicons2svgfont = require('gulp-svgicons2svgfont')

@@ -20,3 +20,3 @@ , svg2ttf = require('gulp-svg2ttf')

return duplexer(inStream, outStream);
return duplexer({objectMode: true}, inStream, outStream);

@@ -23,0 +23,0 @@ }

@@ -24,2 +24,3 @@ var fs = require('fs')

it('should work with iconsfont', function(done) {
this.timeout(5000);
gulp.src(__dirname+'/fixtures/iconsfont/*.svg', {buffer: false})

@@ -31,24 +32,28 @@ .pipe(iconfont({

.pipe(es.wait(function() {
assert.equal(
fs.readFileSync(__dirname+'/results/iconsfont.svg', 'utf8'),
fs.readFileSync(__dirname+'/expected/iconsfont.svg', 'utf8')
);
assert.equal(
fs.readFileSync(__dirname+'/results/iconsfont.ttf', 'utf8'),
fs.readFileSync(__dirname+'/expected/iconsfont.ttf', 'utf8')
);
assert.equal(
fs.readFileSync(__dirname+'/results/iconsfont.eot', 'utf8'),
fs.readFileSync(__dirname+'/expected/iconsfont.eot', 'utf8')
);
assert.equal(
fs.readFileSync(__dirname+'/results/iconsfont.woff', 'utf8'),
fs.readFileSync(__dirname+'/expected/iconsfont.woff', 'utf8')
);
fs.unlinkSync(__dirname + '/results/iconsfont.svg');
fs.unlinkSync(__dirname + '/results/iconsfont.ttf');
fs.unlinkSync(__dirname + '/results/iconsfont.eot');
fs.unlinkSync(__dirname + '/results/iconsfont.woff');
fs.rmdirSync(__dirname + '/results/');
done();
// Trick to wait for datas beeing written to disk...
// https://github.com/wearefractal/vinyl-fs/issues/7
setTimeout(function() {
assert.equal(
fs.readFileSync(__dirname+'/results/iconsfont.svg', 'utf8'),
fs.readFileSync(__dirname+'/expected/iconsfont.svg', 'utf8')
);
assert.equal(
fs.readFileSync(__dirname+'/results/iconsfont.ttf', 'utf8'),
fs.readFileSync(__dirname+'/expected/iconsfont.ttf', 'utf8')
);
assert.equal(
fs.readFileSync(__dirname+'/results/iconsfont.eot', 'utf8'),
fs.readFileSync(__dirname+'/expected/iconsfont.eot', 'utf8')
);
assert.equal(
fs.readFileSync(__dirname+'/results/iconsfont.woff', 'utf8'),
fs.readFileSync(__dirname+'/expected/iconsfont.woff', 'utf8')
);
fs.unlinkSync(__dirname + '/results/iconsfont.svg');
fs.unlinkSync(__dirname + '/results/iconsfont.ttf');
fs.unlinkSync(__dirname + '/results/iconsfont.eot');
fs.unlinkSync(__dirname + '/results/iconsfont.woff');
fs.rmdirSync(__dirname + '/results/');
done();
}, 3000);
}));

@@ -55,0 +60,0 @@ });

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc