Giter Club home page Giter Club logo

automating-your-workflow-with-gulp's Introduction

automating-your-workflow-with-gulp

Gulp是一个非常棒的自动化构建工具, 这是一份内部分享的材料, 包括一个slide, 一个demo, 我用过的 Gulp 插件介绍以及一些 recipes.

如果你有更好的展示形式或者更好的资料, 欢迎star, 发pr哦.

Slide

关于Gulp的一个Slide

demo

请看demo目录下, (node4以上, gulp4.0) 注意: 确保版本正确, 在slide中有相关介绍.

Recipes

注意: 每一个recipe都会有一个 gulpfile, 一个 readme. 前者是代码, 基本可以直接用, 后者是说明. 新开了一个 issue

如果你有什么想要了解的 gulp 任务, 可以给我留言.

插件

编译

CSS

JS

合并

压缩

资源注入

  • gulp-inject - 将指定的css或js文件以标签的形式插入到HTML中的指定标志内。

流程控制

  • run-sequence - 按照顺序执行task (注意: 在 Gulp4.0 中, 已经提供了 gulp.series 方法)
  • gulp-if - If-Else-流程控制
  • gulp-ignore - 选择性过滤文件
  • gulp-filter - 过滤文件, 和 gulp-ignore感觉类似
  • merge-stream - Merge multiple streams into one interleaved stream.
  • event-stream - 方便操作stream
  • gulp-plumber - Prevent pipe breaking caused by errors.
  • gulp-notify - 系统通知
  • gulp-changed - 只通过修改过的文件
  • gulp-changed-in-place - 只通过修改过的文件
    • 区别? gulp-changed 比较的是生成的文件, gulp-changed-in-place比较的是源文件, 复杂情况用后者. (比如需要babel的时候)
  • gulp-order - 重新对文件进行排序 (引入顺序重要的话, 这个插件结合 event-stream 是神器)

代码校验

Angular相关

其他

  • gulp-iife - 将js文件包裹在一个立即执行函数中.
  • gulp-size - 输出文件打下
  • gulp-util - 一些工具方法
  • gulp-replace - 字符串替换 (参考 如何替换掉babel生成的全局'use strict')
  • gulp-rename - 重命名文件
  • gulp-rev -给静态文件打版本号 unicorn.css → unicorn-d41d8cd98f.css.
  • del - Delete files/folders using globs.
  • yargs - 处理 process.argv
  • require-dir 分离gulp任务到多个文件
  • browser-sync -同步多浏览器

文档

参考资料

automating-your-workflow-with-gulp's People

Contributors

tanhauhau avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.