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

fontgen-loader

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fontgen-loader - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

24

index.js

@@ -40,4 +40,2 @@ var loaderUtils = require("loader-utils");

directoryDeps = directoryDeps.concat(globDirs.map(absolute(context)));
}

@@ -62,3 +60,2 @@

};
}

@@ -107,9 +104,18 @@

},
rename: (typeof config.rename == "function" ? config.rename : function (f) {
return path.basename(f, ".svg");
}),
dest: "",
writeFiles: false
writeFiles: false,
formatOptions: config.formatOptions || {}
};
// This originally was in the object notation itself.
// Unfortunately that actually broke my editor's syntax-highlighting...
// ... what a shame.
if(typeof config.rename == "function") {
fontconf.rename = config.rename;
} else {
fontconf.rename = function(f) {
return path.basename(f, ".svg");
}
}
if (config.cssTemplate) {

@@ -119,4 +125,4 @@ fontconf.cssTemplate = absolute(this.context, config.cssTemplate);

for (var option in config.templateOptions) {
if (config.templateOptions.hasOwnProperty(option)) {
for(var option in config.templateOptions) {
if(config.templateOptions.hasOwnProperty(option)) {
fontconf.templateOptions[option] = config.templateOptions[option];

@@ -123,0 +129,0 @@ }

{
"name": "fontgen-loader",
"version": "0.2.0",
"version": "0.2.1",
"description": "A WebPack loader to automaticaly generate font files and CSS to make your own icon font",

@@ -24,3 +24,3 @@ "repository": "DragonsInn/fontgen-loader",

"loader-utils": "^0.2.10",
"webfonts-generator": "^0.3.0",
"webfonts-generator": "^0.3.2",
"glob": "^6.0.2"

@@ -27,0 +27,0 @@ },

@@ -10,3 +10,3 @@ # `fontgen-loader` - Bam, easy webfonts!

- A font file for WOF, EOT, TTF and WOFF2. Also SVG, if you want. But there is a trend of removal withinb rowsers - you can see more on [caniuse](http://caniuse.com).
- A font file for WOF, EOT, TTF and WOFF2. Also SVG, if you want. But there is a trend of removal within browsers - you can see more on [caniuse](http://caniuse.com).
- A CSS has your font configured. That means, it's a proper `@font-face` declaration inclusive icon classes.

@@ -24,3 +24,3 @@ - If you want, a HTML demo page.

{
test: /\.font.(js|json)$/,
test: /\.font\.(js|json)$/,
loader: "style!css!fontgen"

@@ -83,4 +83,7 @@ }

In addition, you also have these options:
- `.rename`: This should be a function that returns the icon's name based on the input (filename).
- `.log`: You can log stuff here.
- `.formatOptions`: An object containing options to their specific transformers. See [this PR](https://github.com/sunflowerdeath/webfonts-generator/pull/6) and [this README entry](https://github.com/sunflowerdeath/webfonts-generator#formatoptions) to learn more.

@@ -94,3 +97,3 @@ You also can use a module like `glob` to pick up a variable set of icons, too. Mix and match and mind the various licenses - and make your own webfont!

- `template`, String
Which template to use? By default, a CSS one is used. The template is to be processed by Handlebars. See [the generator](https://github.com/nfroidure/svgicons2svgfont)'s readme itself for more info.
Which template to use? By default, a CSS one is used. The template is to be processed by Handlebars. See [the generator](https://github.com/sunflowerdeath/webfonts-generator)'s readme itself for more info.

@@ -97,0 +100,0 @@ - `embed`, Boolean

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