Picture compression of gulp automation tools

Source: Internet
Author: User

First, install node

https://nodejs.org/download/

Select the corresponding version as needed

After installation, you can check the version by Node-v.

Node-v

Second, Installation Gulp

NPM Install-g Gulp

Go to project directory

Since the gulp has been installed globally

(But make sure the global version is consistent with the local version.) It's best to reinstall it.

NPM Install--save-dev Gulp

After the installation is done

Gulp–v

The global gulp is consistent with the Gulp version under this project.

Third, install the plug-in

NPM Install--save-dev Gulp-jshint

NPM Install--save-dev gulp-uglify

NPM Install--save-dev Gulp-concat

NPM Install--save-dev Gulp-sass

NPM Install--save-dev Gulp-rename

NPM Install--save-dev Gulp-imagemin

NPM Install--save-dev imagemin-pngquant

After it's installed, the shipment executes the task according to the profile (you can also set the default task)

Let's do the picture compression task.

Gulp Libs:imagemin

When seen here is our picture compression task has been completed.

Reference Links:

Http://javascript.ruanyifeng.com/tool/gulp.html

Https://github.com/gulpjs/gulp

http://gulpjs.com/plugins/

Http://javascript.ruanyifeng.com/tool/gulp.html

Http://www.tuicool.com/articles/ea6FVf

Http://markpop.github.io/2014/09/17/Gulp Getting Started tutorials/

http://gulpjs.com/plugins/

Http://www.zhixing123.cn/computer/gulp.html

Http://sentsin.com/web/861.html

Picture compression of gulp automation tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.