Giter VIP home page Giter VIP logo

gulp-fontello's Introduction

gulp-fontello

Import svg files to Fontello icon font project, use svg filename as glyph name. Also provide task for auto download exported css and font files into destinated folder.

Dependencies Status Npm Version Month Downloads Build Status Npm Licence

PayPal Donate

NPM

Install

npm install --save-dev gulp-fontello

Default Zip Archive Structure

├── LICENSE.txt
├── README.txt
├── config.json
├── css
│   ├── animation.css
│   ├── fontello-codes.css
│   ├── fontello-embedded.css
│   ├── fontello-ie7-codes.css
│   ├── fontello-ie7.css
│   └── fontello.css
├── demo.html
└── font
    ├── fontello.eot
    ├── fontello.svg
    ├── fontello.ttf
    └── fontello.woff

Usage

  • You should get a config.json file from http://fontello.com project and save it somewhere in your project;
  • create Gulp Task:
var
  gulp = require('gulp'),
  $ = require('gulp-load-plugins')()
;

gulp.task('glyph', function () {
  return gulp.src('config.json')
    .pipe($.fontello())
    .pipe($.print())
    .pipe(gulp.dest('dist'))
});

Options

var options = {
  host          :         'http://fontello.com',      // Host for response
  font          :         'font',                     // Destination dir for Fonts and Glyphs
  css           :         'css',                      // Destination dir for CSS Styles,
  assetsOnly    :         true                        // extract from ZipFile only CSS Styles and Fonts exclude config.json, LICENSE.txt, README.txt and demo.html
}

CLI Arguments

Script can accept input parameters in CLI mode and extends options parameters in gulp task, for example:

  • Gulp global install
    gulp <fontello-task> --no-assets-only    
  • Gulp local install (For this make gulp scripts in package.json)
    npm run gulp <fontello-task> -- --no-assets-only

Available arguments

  • --host=host Host for response
  • --css=css Destination dir for Fonts and Glyphs
  • --font=font Destination dir for CSS Styles
  • --no-assets-only Extract from ZipFile CSS Styles and Fonts with config.json, LICENSE.txt, README.txt and demo.html
  • --assets-only Extract from ZipFile only CSS Styles and Fonts exclude config.json, LICENSE.txt, README.txt and demo.html

gulp-fontello's People

Contributors

gillbeits avatar rubensayshi avatar jamesmaroney avatar webxl avatar simison avatar ldu-iris avatar

Watchers

Jorrit Schippers avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.