Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
grunt-combohtml
Advanced tools
合并带有SSI的html代码,并提取其中引用的本地css和js,将他们合并为一个js和一个css,并输出构建好的html
依赖 Grunt 版本~0.4.1
安装
npm install grunt-combohtml --save-dev
安装后,在Gruntfile.js中载入任务
grunt.loadNpmTasks('grunt-combohtml');
在grunt.initConfig()
中添加combohtml的配置:
grunt.initConfig({
combohtml:{
options:{
encoding:'utf8',//输出文件编码
replacement:{ // 抓取js/css文件时路径替换规则,留空为不替换
from:/src\//,
to:'build/'
},
comboJS:true, // 是否静态合并当前页面引用的本地js
comboCSS:true // 是否静态合并当前页面引用的css
},
main:{
files: [
{
expand: true,
cwd:'src',
src: ['**/*.htm'],
dest: 'build/',
ext: '.htm'
}
]
}
}
});
该服务依赖jayli-server,支持标准格式的 SSI include
<!--#include virtual="file.html" -->
task.run(['combohtml']);
FAQs
combine build html with ssi.
The npm package grunt-combohtml receives a total of 3 weekly downloads. As such, grunt-combohtml popularity was classified as not popular.
We found that grunt-combohtml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.