Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gulp on May 30, 2015 #33

Open
hjzheng opened this issue May 30, 2015 · 3 comments
Open

Use gulp on May 30, 2015 #33

hjzheng opened this issue May 30, 2015 · 3 comments

Comments

 @hjzheng
Copy link
Owner

Why use gulp?

First read an article Gulp's goal is to replace Grunt

According to the documentation of Gulp, the main features it strives to achieve are:

  • Easy to use: code is better than configuration. Gulp makes simple things simple and complex tasks manageable.
  • Efficient: By using the powerful stream of node.js, you can complete the construction faster without writing intermediate files to the disk.
  • High quality: Gulp's strict plug-in guidelines ensure that plug-ins are simple and work the way you want them to.
  • Easy to learn: By minimizing the API, you can learn Gulp in a very short time. The construction work is just like what you imagine: a series of flow pipes.

Gulp passed Streams and code are better than configuration Strategy to simplify task writing as much as possible.

Without mentioning anything else, compare the two by code (gulp vs grunt)
You can refer to my code or read it This article
Gruntfile.js
gulpfile.js

The functions of the two are basically similar. Gulp completes tasks through code, which reflects the principle that code is better than configuration and is more friendly to programmers. In addition, it can also string multiple functions at one time without temporarily storing them locally, which reflects the use of convection. This can be read This article The example in.

Some information

Gulp official website http://gulpjs.com/
Gulp Chinese website http://www.gulpjs.com.cn/
Gulp plug-in http://gulpjs.com/plugins/
Awesome Gulp https://github.com/alferov/awesome-gulp

 @hjzheng
Copy link
Owner Author

Gulp common plug-ins

event-stream Event stream, not a plug-in, but very useful
gulp-clean Delete files and directories
gulp-concat Merge Files
gulp-if Run a task conditionally
gulp-minify-css Compress css
gulp-ng-annotate Indicate dependency on for angular
gulp-ng-html2js html2js for angular
gulp-uglify Compress js with uglify
gulp-load-plugins Automatic import of gulp plugin
gulp-load-utils Enhanced gulp utils
gulp-angular-extender Add dependencies for the angular module
gulp-usemin Replaces references to non-optimized scripts or stylesheets into a set of HTML files
browser-sync Automatically synchronize the browser and use it together with the gulp.watch method Example
gulp-babel Compile ES6 code into ES5 Example
vinyl-source-stream Use conventional text streams at the start of your gulp or vinyl pipelines
gulp-browserify Use it and babelify to implement ES6 module Example
babelify Browserify transform for Babel
gulp-autoprefixer Prefix CSS
gulp-task-listing Quick display of gulp task list
gulp-rename rename file
gulp-less Handling less Example
gulp-sourcemaps Generate source map file
gulp-rev Static asset revisioning by appending content hash to filenames: unicorn.css → unicorn-d41d8cd98f.css
gulp-clone Clone files in memory in a gulp stream
gulp-filter Filtering files is very useful
gulp-iconfont Make iconfont Example
gulp-inject Automatically add style and script tags to HTML Example
gulp-traceur Traceur is a JavaScript.next-to-JavaScript-of-today compiler
gulp-useref Similar in function to usemin Example
wiredep Automatically write the tower dependency to index.html Example
gulp-jsdoc Generate JS document
gulp-order Sort the files in src in the specified order
gulp-help Add help description for task

Getting Started with Gulp Video

Learning Gulp (youtube)
Learning Gulp #1 - Installing & Introducing Gulp
Learning Gulp #2 - Using Plugins & Minifying JavaScript
Learning Gulp #3 - Named Tasks
Learning Gulp #4 - Watching Files With Gulp
Learning Gulp #5 - Compiling Sass With Gulp
Learning Gulp #6 - Keep Gulp Running With Plumber
Learning Gulp #7 - Handling Errors Without Plumber
Learning Gulp #8 - LiveReload With Gulp
Learning Gulp #9 - Easy Image Compression
Learning Gulp #10 - Automatic Browser Prefixing
Learning Gulp #11 - Gulp Resources & What's Next

Get started with gulp (youtube)
Get started with gulp Part 1: Workflow overview and jade templates
Get started with gulp Part 2: gulp & Browserify
Get started with gulp Part 3: Uglify & environment variables
Get started with gulp Part 4: SASS & CSS minification
Get started with gulp Part 5: gulp.watch for true automation
Get started with gulp Part 6: LiveReload and web server

Gulp in Action (MOOC)
Gulp in Action (I)
Gulp in Action (II)
Gulp in Action (III)

BGTSD (youtube)
BGTSD - Part 20: Gulp and Babel Basics
BGTSD - Part 21: TypeScript and Gulp Basics

John Papa (Paid)
JavaScript Build Automation With Gulp.js

Gulp wonderful articles

Gulp mode A complete application example of Gulp project

Gulp FAQs

How to copy a directory?

 gulp . src ( [  files  ] ,  {  "base" : "."  } )

Occasionally updating

This article has been migrated here https://github.com/Platform-CUF/use-gulp

 @ittce
Copy link

mark

1 similar comment
 @dszls
Copy link

mark

Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants