npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fontcustom

v0.0.3

Published

wrapper around fontcustom cli

Downloads

2,457

Readme

Node Font Custom

Simple node.js wrapper around fontcustom. Takes one argument "options" which is a map that directly corresponds to command line switches. If the command line switch is either enabled or disabled (e.g "debug") it will be enabled by setting it to boolean true in the options map.

The only exception is the noisy option which specifies if output of the fontcustom child process will be piped to the parent process (defaults to off).

Also with the fontcustom function the default task will be compile if not specified with a task option.

Requirements

Installation

npm install fontcustom

Usage Example

var fontcustom = require("../");

fontcustom({
    "config" : __dirname + "/icons.yml",
    "noisy"  : true,
    "force"  : true
});

Promises

fontcustom returns a A+ compliant promise (bluebird.js). The promise is either resolved or rejected depending on the exit code of the fontcustom child process.

***examle usage with gulp: ***

 gulp.task("global:icons", function(cb){
      return fontcustom({
          "path"   : config.icons,
          "output" : path.join(config.public, "icons"),
          "noisy"  : true,
          "force"  : true
      });
  });

As of this writing here are some example fontcustom options:

fontcustom({
    output            : "./out"                     , 
    /* Where generated files are saved. Set different locations for different file types via a configuration file. */
    
    config            : "./config.yml"              , 
    /* Optional path to a configuration file. Default: ./fontcustom.yml -or- ./config/fontcustom.yml */
    
    templates         : "one two three"             , 
    /* Space-delinated list of files to generate alongside fonts. Use stock templates or choose your own. Default: css preview Possible values: preview, css, scss, scss-rails */
    
    font-name         : "my-custom-font"            , 
    /* The font's name. Also determines the file names of generated templates. Default: fontcustom */
    
    css-selector      : ".custom-icon-{{glyph}}"    , 
    /* Format of generated CSS selector. "{{glyph}}" is substituted for the glyph name. Default: .icon-{{glyph}} */
    preprocessor-path : "./templates/less-template" , 
    /* Optional font path for CSS proprocessor templates. */
    
    autowidth         : true                        , 
    /* Auto-size glyphs to their individual vector widths. */
    
    no-hash           : true                        , 
    /* Generate fonts without asset-busting hashes. */
    
    debug             : true                        , 
    /* Display debugging messages. */
    
    force             : true                        , 
    /* Forces compilation, even if inputs have not changed. */
    quiet             : false                         
    /* Hide status messages. */
});

Aditional Resources

For more documentation/info please visit the fontcustom documentation here