New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-htmloptimize

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-htmloptimize

gulp html files

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gulp-htmloptimize

构建 html 的 gulp 模块

用法

var htmloptimize = require('gulp-htmloptimize');
gulp.task('htmloptimize', function() {
  return gulp.src('./**/*.html')
    .pipe(htmloptimize({}))
    .pipe(gulp.dest('./dist'));
});

优化哪些方面

  1. 在合适的地方加上特定格式的html注释就能编译css、 js 文件
  2. 编译css文件:
    • 支持 @import url(file.css)
    • 自动加浏览器厂商前缀,解决兼容性问题,使用 autoprefixer-core 库
    • 压缩、优化css,使用 clean-css 库
  3. 编译js文件
    • 压缩混淆 js 代码,使用 uglify-js 库
  4. 行内样式、js优化
  5. 自定义配置

文档

wiki

LICENSE

MIT License

Keywords

FAQs

Package last updated on 19 Mar 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc