Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
edp-build-inline
Advanced tools
EDP Build plugin for inline resource
edp-build-inlnie 是 edp-build 的一个插件,用于内联静态资源,支持图片、脚本、样式等。
.icon {
/* 使用查询参数方式指定要内联的图片 */
background: url(img/loading.gif?_inline)
}
var InlineProcessor = require('edp-build-inline');
// 复杂自定义任务
var escapeTask = function (file) {
return file.data.replace(/\{|\}/g, function (match) {
return {'{': '{ldelim}', '}': '{rdelim}'}[match];
});
};
var inlineProcessor = new InlineProcessor({
files: ['templates/index.tpl'],
customTask: {
js: escapeTask,
css: escapeTask
},
inlineOption: {
img: true,
inlinePathGetter: function (path) {
var newPath = path.replace(/\{\$host\}\//, '');
return {path: newPath, dir: '.'};
}
}
});
// 简单:只对样式图片内联
var inlineProcessor = new InlineProcessor({
files: ['src/main.css'],
inlineOption: {
img: {
limit: 1024 * 5 // 小于 5kb 图片才内联
}
}
});
return {
'default': [
lessProcessor, moduleProcessor, inlineProcessor, pathMapperProcessor
],
'release': [
lessProcessor, cssProcessor, moduleProcessor,
jsProcessor, inlineProcessor, pathMapperProcessor, addCopyright
]
};
更多内联选项 inlineOption
参考 inline-resource 。
FAQs
Auto inline css/html/img/svg etc. processor for edp build
The npm package edp-build-inline receives a total of 1 weekly downloads. As such, edp-build-inline popularity was classified as not popular.
We found that edp-build-inline 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.