
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
gulp-html-inline
Advanced tools
combo and minify css and js to html. no matter the file is online or not.
var gulp = require('gulp');
var htmlInline = require('gulp-html-inline');
gulp.src('inline.html')
.pipe(htmlInline({ minifyJs: true }))
.pipe(gulp.dest('dist'));
<!-- link tag -->
<link rel="stylesheet" href="assets/css/a.css?_toinline"/>
<link rel="stylesheet" href="assets/css/b.css?_tohash"/>
<!-- style tag -->
<style>
#content{
padding: 20px;
border: 1px solid rgba(0,0,0,.3);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
</style>
<!-- script tag -->
<script src="assets/js/a.js?_toinline"></script>
<script src="assets/js/b.js?_toinline"></script>
<script src="assets/js/c.js?_tohash" ></script>
<script>
var a = 0,
b = 1;
var arr = [];
arr.push(a);
arr.push(b);
</script>
gulp.src('./src/*.html')
.pipe(htmlInline({
queryKey: '_rvc', //指定需要内联的url后面必须带缓存query key, 默认 _rvc
toInline: '_toinline', //指定需要内联的url后面必须带的query key, 默认 _toinline
toHash: '_tohash', //指定需要内联的url后面必须带的query key, 默认 _toinline
hashSize: 8, //指定hash值长度,默认 8
minifyJs: true //选择是否压缩js,
//资源文件路径
basePath: '../'
}))
// ...
#License ISC
FAQs
压缩html中的css和js(可将link和script中的href或者src引入的文件直接压缩替换到html中)
We found that gulp-html-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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.