Socket
Socket
Sign inDemoInstall

gulp-cssfont64-formatter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-cssfont64-formatter - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

15

index.js

@@ -15,3 +15,8 @@ 'use strict';

module.exports = function (formatter) {
module.exports = function (opts) {
// For backwardscompatability, if its a function it means a formatter. Else expects a config-object.
var options = typeof opts === 'function' ? {
formatter: opts
} : opts;
// create a stream through which each file will pass

@@ -38,4 +43,4 @@ return through.obj(function (file, enc, callback) {

var csswrapper = '';
if (formatter) {
csswrapper = formatter(filename, mtype, file64, format);
if (options.formatter) {
csswrapper = options.formatter(filename, mtype, file64, format);
} else {

@@ -45,4 +50,6 @@ csswrapper = '@font-face {font-family: ' + filename + '; src: url(data:' + mtype + ';base64,' + file64 + ') format("' + format + '");}';

var extention = options.extention ? options.extention : 'css';
file.contents = new Buffer(csswrapper);
file.path = gutil.replaceExtension(file.path, '.css');
file.path = gutil.replaceExtension(file.path, '.' + extention);
return callback(null, file);

@@ -49,0 +56,0 @@ }

{
"name": "gulp-cssfont64-formatter",
"version": "0.0.1",
"version": "0.0.2",
"description": "Encode base64 data from font-files and store the result in a css file.",

@@ -14,3 +14,8 @@ "main": "index.js",

"keywords": [
"gulpplugin", "encode", "base64", "font", "css", "ttf"
"gulpplugin",
"encode",
"base64",
"font",
"css",
"ttf"
],

@@ -17,0 +22,0 @@ "author": {

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