• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

googlearchive/polybuild: Easy Optimization Tool / Gulp plugin

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

googlearchive/polybuild

开源软件地址(OpenSource Url):

https://github.com/googlearchive/polybuild

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

polybuild is deprecated!

Please use the Polymer CLI or polymer-build instead.


Polybuild

An all-in-one build tool for Polymer apps

Polybuild combines vulcanize, crisper, and polyclean into one easy to use solution for optimizing Polymer applications for production.

Polybuild exposes a gulp plugin, and a small command line tool to fit your build environment.

Command Line Tool

Install:

npm install -g polybuild

Use:

polybuild index.html

Output: index.build.html and index.build.js

The equivalent command line usage is:

vulcanize --inline-css --inline-scripts --strip-comments index.html | polyclean | crisper --html index.build.html --js index.build.js

Gulp Plugin

Install:

npm install polybuild

Use in gulpfile.js:

var gulp = require('gulp');
var polybuild = require('polybuild');

gulp.task('build', function() {
  return gulp.src('index.html')
  .pipe(polybuild())
  .pipe(gulp.dest('.'))
;
})

Output: index.build.html and index.build.js

The equivalent gulp pipeline is found in index.js

Options

PolyBuild has two options: "maximum crush" and "suffix". First option affects whether the output javascript is minified, or only has whitespace removed, second option needed if you want change default "build" suffix.

If you have a more advanced use case than is provided, please copy the equivalent portions of the command line or gulp internals as a starting point.

Example of options usage on the command line with flags:

polybuild index.html --maximum-crush --suffix customsuffix

which will output the file index.customsuffix.html

You can use options in gulp, like in this example

//...
.pipe(polybuild({maximumCrush: true, suffix: 'build'})
//...



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Sponsor @shannonmoeller on GitHub Sponsors · GitHub发布时间:2022-06-21
下一篇:
cssanimation/gulp-sass-starter发布时间:2022-06-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap