gulp tutorial

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

Add a version number to the module introduced by Gulp for Requirejs

Because the project uses REQUIREJS, and the project is managed uniformly through gulp, in order to prevent the browser from caching the file, add the version number to the file in the project by Gulp. 1, respectively installed Gulp-rev, Gulp-rev-collerctorNPM Install--save-dev gulp

Create an AJAX impersonation request using Gulp

OverviewBefore I used gulp to build front-end projects, this node-based and advocating "programming rather than configuring" tools made me fall in love with him. Powerful gulp can do more than just compress and merge js, CSS, it can do more. Today I bring you to use the gulp foreground to create AJAX simulation data.The problem solvedDevelopment, the backend has

Gulp Study Notes (i)

Gulp is a NODEJS-based automatic task runner that automates the testing, checking, merging, compressing, formatting, automatic browser refresh, and deployment file generation of JAVASCRIPT/COFFEE/SASS/LESS/HTML/IMAGE/CSS and other files. And listen for files that repeat the specified steps after the change. In the implementation, gulp borrowed from the UNIX operating system pipeline (pipe) thought, the prev

"Gulp-sass" Error:file to import not found or unreadable

This error occurs when you use Gulpfile to configure the automatic compilation of a listening file update: "Error:file to import not found or unreadable:./m-body"And there will be a strange phenomenon, when the change of a file encountered this error and then restart the compilation of the normal monitoring of the file, but the other files are not, it is the file after the error and then restart the compilation is normal.Try a variety of solutions have no effect, once thought is Gulpfile file wr

Gulp First Impressions

A few months ago, San Mujun recommended to me gulp, to now because the work needs to touch it, really ashamed, in this record of the first impression of Gulp.Global Installation:$ NPM Install–global GulpA gulpfile.js file:This file needs to be created in the root directory of the project. Default task (Do Nothing): var gulp = require(' Gulp ');

Gulp do a simple JS compression

Installation ToolsGlobal InstallationNPM Install--global GulpDependent installation of the project--save-dev Gulp--save-dev Gulp-rename--save-dev gulp-uglify--save-dev Gulp-concatCreate the gulpfile.js in the SRC directory you want to compressvarGulp = require (' Gulp '));va

Use Gulp to build ES6 operating environment

ES6 introduced a lot of new syntax features, but want to do in the existing browser environment, need to ES6 code to ES5 code, there are many transcoding babel,traceur, etc., after reference, use Traceur and gulp to build ES6 environment, start my ES6 .Start installationFirst make sure the Nodejs is installed on your computer.1. Create a project directory2. Global installation traceur, in console inputNPM install-g traceur3. Open the project directory

Gulp Css,js Compression Merge encryption replacement

To prevent the client from caching static resources, we need to rename the static resources by MD5 or timestamps every time we update the CSS or JS. Allows the client to re-request the resource instead of fetching it from the cache. The SRC in the HTML template is then modified accordingly. Of course, there is an additional requirement that static resources need to be optimized for themselves (compression merges).Here is the code for my gulpfile.js:varGulp = require ('

Gulp,grunt,webpack Rookie Finishing

First of all, it is not very good to put webpack here, because Webpack is more accurate than the require,sea of such modular tools, and the former two more inclined to compression confusion and so on;After downloading the NPM package, each of the three will need their config file;Grunt Congfig File Writing format is a key value, similar to the writing of a configuration, gulp is a fallback function, like programming, Wepack configuration written simil

Gulp JS Simple operation-to be continued

First, install the Gulp1. Before setting up the task in depth, you need to install Gulp:$ NPM Install Gulp-g2. This will install gulp into the global environment, allowing you to access the Gulp CLI. Next, you need to install the project on the local side. CD to your project root directory and execute the following ins

The difference between Gulp and Webpack

Webpack is a packaging toolWebpack is used to package your source files into a file, you have done a series of configurations, you can use a sentence Webpack to implement the functionality of packaging.The role of Webpack is to start with a number of files, find all relevant files based on the citation relationship between files, and pack them into several packaged files.Gulp is an automated tool .Gulp is used to automate, after you write a bunch of t

Typescript learning based on Gulp+browserify+browser-sync and other building automation development environment

This is not about what typescript is, Typescript is a superset of JavaScript, but in the process of using or learning, We need to compile a well-written. ts file into a. js file before it can be used, so it adds a lot of trouble to the beginning of the learning process, so it's why I have to build an automated development environment that can save a lot of time on some mechanical work. Typescript official website gave a formal environment, but not enough to meet my needs, so I need to build on t

Node learning Note (iv): Gulp+express+io.socket deployment AngularJs2 (pits)

This is the first time to pause the next blog-you draw my guess the progress, because in this game, want to use the latest NG2 technology, but the pit is a piece after another, this way first introduced the environment deployment and pits historySince to use NG2, first to get resources, I use the AngularJs2 beta version of the online resources have two kinds, One is a fully compressed version of the file. Min.js version of the other is a lot of messy JS files, mainly ng2 has been fully adopted t

Using gulp to solve the problem of header/footer introduction of front and rear end separation

When we are completely separated from the front and back, there is a problem that has always been a headache, that is, the introduction of public headers and footer. In the case of traditional back-end rendering, we can write the header, footer as two separate templates, and then use the back-end language's include to be introduced in other pages. I previously in the "a simple rough front-end separation scheme," this article said one way, is to use handlebars the header, footer template precompi

Clear, move, compress, merge, replace code with gulp

Before the front-end code deployment is grunt, and then a gulp tool, recently tried a bit, very convenient, feel better than grunt easy to use, the following some common tasks listed, spare.varGulp = require (' Gulp '));varSdir = ' 0.0.1 ';varDdir = ' 0.0.1.release ';varGutil = require (' Gulp-util '));varClean = require (' G

Building a react task using gulp

For gulp in react in the construction, find a lot of information, read a lot of articles, also according to the article tested many times, but is not successful. Many articles in fact are more or less lack of some steps, but also not to the source file reference, this is for the novice is the capital of the ignorant force. Finally found an article can be achieved, reproduced. You can write react in the back.The sample directory structure is as follows

Gulp Monitor file changes and copy to the specified directory

Directory modification, creation, and deletion are not supported for the time being.varGulp = require (' Gulp '));varFS = require (' FS ');varPath = require (' path ');varless = require (' gulp-less ');varSass = require (' Gulp-sass '));varMinifycss = require (' gulp-minify-css '));varConcat = require ('

CSS merging, compression and MD5 naming and path substitution for the Gulp Learning Guide

Gulpfile.jsvarGulp = require ('Gulp');varConcat = require ('Gulp-concat');//-Multiple files merged into one;varMinifycss = require ('Gulp-minify-css');//-Compress CSS into one line;varRev = require ('Gulp-rev');//-add MD5 suffix to file namevarRevcollector = require ('Gulp-r

Gulp-less plugin less file compiled into CSS

Gulp is based on node, so the first step is to make sure you have the node environment installed, how to install it can go to the node website to see (https://nodejs.org/en/)1.Global buttonGulpOpen the Node window input npm Install-g GulpAfter the global installation, go to the current directory to install the local installationnpm Install--save-dev GulpUse the command line when both the global and local project folders are installedgulp–v Check out t

Gulp-webpack Simple Application

1. Configure the environment: in the Webstorm console (1) cnpm install--save-dev Gulp (2) cnpm install--save-dev Gulp-webpack(3) cnpm install Babel-loader babel-core babel-preset-es2017--save-dev2. Directory structure: (The build folder is automatically generated after all files have been configured in Webstorm console after input gulp)3.gulpfile File configurati

Total Pages: 15 1 .... 11 12 13 14 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.