
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
auto-sprites
Advanced tools
npm install auto-sprites -g
sprites <root> <source> <target> <sprites> [base64] [level]
root
文件存放的根目录,比如htdocs
source
指定编译的文件夹,比如/css/6v
target
指定编译后文件存放的位置 比如/css/6v
sprites
指定图片文件存放的位置 比如/simg
base64
是否启用base64编码
level
以文件或者文件夹的维度合并图片,默认值为file
垂直合并
水平合并
对角线合并
紧凑合并
var sprites = new AutoSprites({
data: cssData, /*合并的CSS的数据*/
root: '/', /*image的root*/
path: path.join(process.cwd(), config.target, 'img'), /*image存放路径*/
fileName: fileName, /*文件名称,针对该名称进行base64编码生成图片的名称*/
base64: false /*是否启用base64编码*/
});
由于无法解析组合类,所以建议图片和样式书写在一个样式里面,另外无法找到的图片将被忽略。
2014-04-22 : 修复注释解析错误的问题,修复sprites命令base64参数解析的问题
2014-01-21 : 修复windows下路径替换错误的问题
2013-11-19 :修复注释解析错误的问题
FAQs
We found that auto-sprites demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.