1, Gulp IntroductionGulpis based onNodejsAutomatic task Runner that she can automate to completeJavaScript,Coffee,Sass, Less,Html/image,CSSfiles such as test, check, merge, compress, format, browser automatic refresh, deployment file generation, and listen to the file after the changes are repeated the specified steps。in the realization, she borrowed from the Unixthe piping of the operating system (Pipethought, the output of the previous level, direct
Transfer from Gulp vs Grunt1. Grunt-GulpThe early mention of building tools is inevitably reminiscent of a long history, Make Ant and later, for more convenient construction of similar Java projects Maven . Node spawned a number of automated tools, such as Bower,yeoman,grunt. And now the front-end mentions that the build tool will naturally be remembered Grunt . Maven in the Java World provides a powerful package dependency management and build lifecy
English Original: spring-cleaning Unused CSS with Grunt, Gulp, broccoli or brunch
Want to improve the speed of the web, generally by reducing response time, standardize the css/js/html and the content of the picture. also through optimized css removing unused css
to increase the loading degree. See how it is implemented. First share some of the available tools.
Added grunt-uncss at lunch time to my Sites Gr
GulpGulp is a nodejs streaming build tool, the so-called streaming general meaning is to think of the construction process as a link pipe (pipe). Why did you do it?To explain why, you have to mention UNIX. UNIX itself provides only a relatively small number of commands, but you can perform powerful functions with a combination of commands. The connection between commands and commands is usually the pipe.Similarly, with Gulp, you just need to remember
gulp+webpack Configuration
first, let's introduce Gulp and Webpack .
Gulp
Gulp is a tool for building the code in the front-end development process, and is the building block of the automation project; She not only optimizes the site resources, but also many repetitive tasks can be done automatically with the right
What is the Gulpfile.js file:Gulp is a tool for building code in the front-end development process, and is the building block of automation projects ; She not only optimizes the site resources, but also has many repetitive tasks that can be automated using the right tools during the development process; We can not only very happy to write code, but also greatly improve our efficiency.Gulpfile.js is the core document that helps gulp automate the manage
Recently need to optimize the project, mainly on the compression of JS and CSS file compression, find relevant information found gulp can achieve the relevant functions, hereby share the use of experience.1. Installing GulpGulp is a front-end build tool based on node. js. So first you need to install Nodejs, install Nodejs.After you complete the NODEJS installation, you need to use NPM to install Gulp.Install the Global
Gulp is a task-based JavaScript Engineering command-line streaming build tool. Why do you use Gulp? Front-end development into the engineering phase, we need to compress the merged files, add MD5 stamp, if you use COFFEESCRIPT/ES6 to replace Javascript, then need to compile into jacascript, if you use less or sass, you need to compile into CSS. All of these operations, after modifying the file, must be re-e
Gulp is a tool for building projects automatically during the front-end development process, as well as grunt. The build tool relies on plug-ins to automatically monitor file changes and complete the syntax checking, merging, renaming, compressing, formatting, automatic browser refresh, and deployment files of Js/sass/less/html/image/css/coffee and other files.Gulp is a Nodejs-based auto-runner, and he draws on the idea of the UNIX operating system's
1. To be in the node environment2.Global Install NPM Install GULP-GInstalling NPM Install Gulp--save-dev in the project3. Installing plugins
Compilation of sass (Gulp-ruby-sass)
Automatically add CSS prefixes (gulp-autoprefixer)
Compress css (GULP-MINIFY-CSS)
JS co
Use gulp to compress html, js, css, and images of the project,1, download and install node access http://nodejs.org, and then click the big greeninstallClick to directly run the program after the download is complete, and everything is ready. Npm will be installed along with the installation package. 2. Open the code line.Node-v // view the node version. if the version is displayed, the installation is successful.npm -v //Check the npm version. if t
Using Gulp:1. Solve version problems with JavaScript and CSS.2. To solve the problem of JavaScript and CSS dependencies, in loading order, building tools can greatly reduce such problems.3. In the performance optimization, when the project has a large number of JS files, the more files you request, the more time it takes, this will undoubtedly slow down the speed of the page, and gulp can be: file merging,
About Learning Gulp, recommend you look at the front-end building tools Gulpjs use of introduction and skills, this article is quite comprehensive. 1 , installation of Gulp Gulp was developed based on Nodejs, so it was first determined that Nodejs was installed.(1) Global Installation GulpNPM Install-g Gulp(2) Local
Bower.json:bower Init
Install various package files: Bower Install
Uninstall package file: Bower Uninstall
Package Search: Bower search
Package version: Bower info
Modify the Bower installation location: Create the. BOWERRC under the project root and add the following ' { "Directory": "Vendor"//Here is the specified package installation path, and then remember to delete this comment}`
4.Gulp
What
Because of the typhoon "could hung" influence, this weekend could not go out on foot, in order not to waste this good time, so summarize the previous period of time to learn gulp.Gulp is now the most Popular front-end build tool, it is more significant feature is the configuration is easy to learn, and gulp the greatest advantage is that it is the use of the flow (Streams) to the processing of files, through the pipeline (pipe) Multiple tasks (task)
At present, the industry is more well-known three front-end building tools: Grunt, Gulp, FIS, I have been only in the past with Grunt,fis have seen a little, gulp has not been noticed, until recently found it seems to use more and more people, so today also smoked a bit of time to try a bit."What is Gulp?"The official word is:
Development Dev
Gulp-load-pluginsUsing the Gulp-load-plugins module, you can load all the Gulp modules in the Package.json file, instead of loading them one by one.
var gulp = require (' Gulp '),
gulploadplugins = require (' Gulp
To sort out the theoretical parts of the previous stuff--Gulp Front-end build tool It can help us do some automated thingsIt needs some plug-in supportvar gulp = require (' gulp '); --Gulp CommandRequire (' Yargs '). argv;It can listen for the parameters added after gulpClose Gulp
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.