• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

gillbeits/gulp-fontello: Import svg files to Fontello icon font project, use svg ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

gillbeits/gulp-fontello

开源软件地址(OpenSource Url):

https://github.com/gillbeits/gulp-fontello

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource 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
  cache         :         $.fontello.simpleFsCache('cachedir') // object containing methods get(key, callback) and set(key, value)
}

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



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap