在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):backflip/gulp-iconfont-css开源软件地址(OpenSource Url):https://github.com/backflip/gulp-iconfont-css开源编程语言(OpenSource Language):CSS 59.5%开源软件介绍(OpenSource Introduction):gulp-iconfont-css
WarningRecent versions of gulp-iconfont emit a UsageFirst, install npm install --save-dev gulp-iconfont gulp-iconfont-css Then, add it to your var iconfont = require('gulp-iconfont');
var iconfontCss = require('gulp-iconfont-css');
var fontName = 'Icons';
gulp.task('iconfont', function(){
gulp.src(['app/assets/icons/*.svg'])
.pipe(iconfontCss({
fontName: fontName,
path: 'app/assets/css/templates/_icons.scss',
targetPath: '../../css/_icons.scss',
fontPath: '../../fonts/icons/'
}))
.pipe(iconfont({
fontName: fontName
}))
.pipe(gulp.dest('app/assets/fonts/icons/'));
});
APIiconfontCSS(options)options.fontNameType: The name of the generated font family (required). Important: Has to be identical to iconfont's options.pathType: The template path (optional, defaults to options.targetPathType: The path where the (S)CSS file should be saved, relative to the path used in options.fontPathType: Directory of font files relative to generated (S)CSS file (optional, defaults to options.cssClassType: Name of the generated CSS class/placeholder. Used for mixins and functions, too. See https://github.com/backflip/gulp-iconfont-css/tree/master/templates. Default is options.engineType: options.aliasesType: Use if you want multiple class names for the same font/svg value ie. use the github svg as .github or .git The template engine to use (optional, defaults to options.cacheBusterType: A string that will be appended to fonts URLs as query string (optional, defaults to the emtpy string, i.e. no cache buster).
Query string heading questing mark |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论