在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):frontendbeast/gulp-svg-spritesheet开源软件地址(OpenSource Url):https://github.com/frontendbeast/gulp-svg-spritesheet开源编程语言(OpenSource Language):JavaScript 92.2%开源软件介绍(OpenSource Introduction):#gulp-svg-spritesheet A gulp.js plugin to generate an SVG sprite sheet. Unlike other node SVG plugins, this does not require Windows users to install Python or Visual Studio C++. All output is done using mustache templates, and as such can be customised to work for Sass, Less, CSS or whatever you like. ##Install
##Basic usage In it's simplest form, all you need to define is the source mustache formatted template file and the destination for the rendered file, plus the path to the sprite relative to the destination.
##Complex usage You can also specify a no-SVG fallback image path, add padding, use relative units and specify positioning layout. You can also chain in other gulp plugins.
##Options ####cssPathNoSvg Type: Optional. CSS ####cssPathSvg Type: CSS ####demoDest
Type: Optional. A demo file can be created showing all of the SVGs within the spritesheet. A sample is provided in the ####demoSrc
Type: Optional. The source mustache template file used to create the ####padding
Type: Add padding around the individual sprites. Value is pixel based. ####pixelBase
Type: Optional. Used if anything other than ####positioning
Type: Allows icons to be layed out in one of several ways:
####templateDest
Type: The destination of the sprite sheet CSS generated from ####templateSrc
Type: A mustache template file used to output the sprite sheet CSS. ####units
Type: CSS background size and position units of measurement. If a value other than ####x
Type: Offset the starting X position on the sprite sheet. ####y
Type: Offset the starting X position on the sprite sheet. ##Disclaimer This is my first gulp plugin, so it might be complete rubbish. It's very alpha right now, and as such may not work. If you spot any bugs, or areas for improvement then feel free to go fork yourself and send me a pull request! ##Thanks @shakyShane and his gulp-svg-sprites plugin, which I was using before I need it to run without a Python dependancy. @FWeinb and his grunt-svgstore plugin, which I took inspiration from in using Cheerio. @jakesgordon and his bin-packing algorithm, which is used when Code Computerlove, the agency for whom I created this plugin, for allowing me to open source it. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论