gulp tutorial

Want to know gulp tutorial? we have a huge selection of gulp tutorial information on alibabacloud.com

Gulp Tutorial Gulp Chinese API

return the current task of the event stream, see the following example);JavaScript 1234567891011 Gulp. Task(' testless ', function () { return Gulp. SRC([' less/style.less ']) . Pipe(less()) . Pipe(gulp. Dest('./css ')); }); gulp. Task ( ' minicss ' , Span class= "Cr

The Gulp-imagemin of Gulp tutorial

Original link: http://www.ydcss.com/archives/26 Introduction: Using Gulp-imagemin compressed picture files (including PNG, JPEG, GIF, and SVG pictures), many people will be installed gulp-imagemin errors, I also looked at a lot of information, do not know why, my practice is to reinstall the error, if you know the problem, Please be sure to tell me. 1, install nodejs/Global installation

Gulp Configuration Version Number tutorial Gulp-rev-append

12345678910111213 ! DOCTYPE HTML> html> head> link rel="stylesheet" href="Css/[email protected] @hash"> /head> body> div>Hello, world ! /div> img src="Img/test.jpg?r[email protected] @hash" alt="" c24>/> /body> /HTML> 4, Configuration Gulpfile.js4.1. Basic use (Add a version number to the page reference URL to clear the page cache)JavaScript 12345678 var

The gulp-htmlmin__html of Gulp tutorial

Original link: http://www.ydcss.com/archives/20 Introduction: Use Gulp-htmlmin compressed HTML, you can compress the page JavaScript, CSS, remove the page spaces, annotations, delete redundant attributes and so on. 1, install nodejs/Global installation gulp/Local installation gulp/create Package.json and gulpfile.js files 1.1,

Gulp Tutorial: What Gulp can do, the front-end assembly force why use it

our unit tests automatically before committing.Code AnalysisWe write JavaScript often have some potential bugs, such as forget to add a semicolon, a variable does not wait, use some JavaScript code analysis tool, can help us to check some common problems. HTML reference JavaScript or CSS files such as we need to use Bower to refer to the front-end JavaScript and CSS third-party libraries, if the version upgrade, add Remove and so on by hand to modify the HTML, first more time-consuming, the sec

Gulp Tutorial: What Gulp can do, the front-end assembly force why use it

tool to run our unit tests automatically before committing.Code AnalysisWe write JavaScript often have some potential bugs, such as forget to add a semicolon, a variable does not wait, use some JavaScript code analysis tool, can help us to check some common problems.HTML referencing JavaScript or CSS filesFor example, we need to use bower and the like to reference the front-end JavaScript and CSS third-party library, then if the version upgrade, add Remove and so on by hand to modify the HTML,

Gulp Getting Started Tutorial

complete ' })); the }); + //Images AGulp.task (' images ',function() { the returnGULP.SRC (' images/* ') +. Pipe (Cache (Imagemin ({optimizationlevel:3, progressive:true, Interlaced:true }))) -. Pipe (Gulp.dest (' images ')) $. Pipe (Notify ({message: ' Images task complete ' })); $ }); - //Default Task -Gulp.task (' Default ',function() { theGulp.start (' Styles ', ' scripts ', ' images ')); - });Wuyi //Watch theGulp.task (' Watch ',function() { - //Watch. scss files WuGulp.watch (' styles

Front-end build tool Gulp Getting Started tutorial

layer after the exposure to users, such as Grunt-contrib-compass. While it may be possible to make the configuration of the plug-in more uniform, it does result in additional understanding costs. With Gulp your build file was code, not config Libraries to do things Plugins is simple and do one thing-most is a line function Tasks is executed with maximum concurrency I/O works the IT Write it in the back.Although

Front-end build tool Gulp Getting Started tutorial

them to the dist/ directory.Default taskgulp.task(‘default‘, function(){ gulp.run(‘lint‘, ‘sass‘, ‘scripts‘); gulp.watch(‘./js/*.js‘, function(){ gulp.run(‘lint‘, ‘sass‘, ‘scripts‘); });});At this point, we create a default task that is based on other tasks. Use .run() methods to correlate and run the tasks defined above, use the .watch() method to listen for file changes in the specified directory, and, when there are changes to the file, run other tasks defined by the callback.Now, back to

Front-end build tool Gulp Getting Started tutorial (share)

() { gulp.src ('./js/*.js ') . Pipe (concat (' all.js ')) . Pipe (Gulp.dest ('./ Dist '). Pipe ( rename (' All.min.js ')). Pipe ( uglify ()) . Pipe (Gulp.dest ('./dist ') ));});The scripts task merges js/ all the JS files in the directory and outputs them to the dist/ directory, and then gulp renames, compresses the merged files, and outputs them to the dist/ directory.Default taskfunction () { gulp.run (' lin

Picture compression of Gulp tutorial

renderingMultipass:true//Type: Boolean default: False multiple optimizations to optimize SVG until fully optimized} ) ). Pipe (Gulp dest (' dist/img '));} ) ; b, use imagemin-pngquant depth compression picture 1 $ NPM Install imagemin-pngquant--save-dev 1234567891011 var gulp = require (' Gulp '),Imagemin = req

Gulp Getting Started Tutorial

() { gulp.src ('./scss/*.scss ') . Pipe (Sass ()) . Pipe (Gulp.dest ('./css ‘));});/ /merge, compress file Gulp.task (' Scripts ', function () { gulp.src ('./js/*.js ') . Pipe (concat (' all.js ')) . PIPE ( Gulp.dest ('./dist ')). Pipe (rename (' All.min.js ')). Pipe (Uglity ( )) . Pipe (Gulp.dest ('./dist '));}); /Default task Gulp.task (' Default ', function () { gulp.run (' Lint ', ' sass ', ' scripts '); Listener file Chang

Node.js-based JavaScript project building Tools Gulp Tutorial _javascript Tips

NPM Install Gulp--save-dev What is Gulp?Gulp is a new generation of front-end project building tools, you can use Gulp and its plug-ins to your project code (LESS,SASS) to compile, you can compress your JS and CSS code, or even compress your pictures, gulp only a smal

Yeoman+bower+gulp Web front-end Automation workflow (beginner tutorial)

action process part of the tool, that is, you need a line of command, do not have to manually create folders and structure.However, you may have to think about it, I do not have the directory structure of each project to be one, what should be done? It is necessary to install different generator depending on the project (http://yeoman.io/generators/), of course, you can also customize a generator, and then publicly for others to use, now we just learn how to use other people's generator , I wil

Gulp Tutorial Compression Merge Css,js

(' Gulp '), minifycss = require (' Gulp-minify-css '), concat = require (' Gulp-concat '), Uglify = require (' gulp-uglify '), rename = require (' Gulp-rename '), gutil = require (' Gulp-util ');2. Add an execution

Front-end Automation Tool Gulp automatically add version number tutorial

Before, I introduced to learn to install and configure the front-end Automation Tool gulp, feel gulp indeed than grunt configuration is much simpler, so I decided to further study gulp, went to the Internet to check the data, found that gulp can also automatically add version number, This function is usually when I upd

Gulp plug-in GULP-IMAGEMIN,IMAGEMIN-PNGQUANT-GFW and Gulp-cache

Introduction to GULP-IMAGEMIN,IMAGEMIN-PNGQUANT-GFW and Gulp-cache : gulp-imagemin plugin is used to compress picture files (including png,jpeg,gif and SVG images). IMAGEMIN-PNGQUANT-GFW plugin is used to compress image files in PNG format in depth. The gulp-cache plugin is used to read cache files. Compressin

Gulp pitfall series (4) -- code conversion of gulp, gulp

Gulp pitfall series (4) -- code conversion of gulp, gulpFinally, I entered the topic. It was just to convert Sass and SCSS code into CSS that I suddenly jumped from the learning path of Sass to the big pitfall of gulp. Of course, gulp can not only convert Sass, but here we will mention the following conversion:First, c

Gulp plug-in gulp-clean-css and gulp-make-css-url-version

Introduction to GULP-CLEAN-CSS and Gulp-make-css-url-version:The Gulp-clean-css plugin is used to compress CSS files. The gulp-make-css-url-version plugin is used to give the URL in the CSS file Add version number (build number based on the MD5 of the referenced file). I. gulp

Introduction and usage of plug-ins commonly used when using gulp

plug-ins available for use: compiling Gulp-sass-Compiling the sass into CSS via Libsass Gulp-ruby-sass-compiling sass into CSS via Ruby Sass Gulp-compass-compiled into CSS via Ruby sass and Compasssass Gulp-less-less compiled into CSS. Gulp-stylus-stylus compiled into CSS.

Total Pages: 15 1 2 3 4 5 .... 15 Go to: Go

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.