This tutorial has been prepared for beginners to help them understand the basic functionalities of Gulp.

Similar documents
Scalable Vector Graphics commonly known as SVG is a XML based format to draw vector images. It is used to draw twodimentional vector images.

In this tutorial, we are going to learn how to use the various features available in Flexbox.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Drupal

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Meteor

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. WordPress

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. RichFaces

This is an introductory tutorial designed for beginners to help them understand the basics of Radius.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

This is a brief tutorial that explains how to make use of Sqoop in Hadoop ecosystem.

This tutorial also elaborates on other related methodologies like Agile, RAD and Prototyping.

You must have a basic understanding of GNU/Linux operating system and shell scripting.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Joomla

So, this tutorial is divided into various chapters and describes the 5G technology, its applications, challenges, etc., in detail.

This tutorial has been prepared for beginners to help them understand the simple but effective SEO characteristics.

This tutorial will guide users on how to utilize TestLodge in reporting and maintaining the testing activities.

Parrot is a virtual machine designed to efficiently compile and execute bytecode for interpreted languages.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Jenkins

This tutorial explains the key concepts of Web Dynpro with relevant screenshots for better understanding.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer ASP.NET WP

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer. PySpark

Testing is the process of evaluating a system or its component(s) with the intent to find whether it satisfies the specified requirements or not.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Django

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. TurboGears

WebGL (Web Graphics Library) is the new standard for 3D graphics on the Web, designed for rendering 2D graphics and interactive 3D graphics.

This tutorial will teach you how to use Java Servlets to develop your web based applications in simple and easy steps.

This tutorial will help you in understanding IPv4 and its associated terminologies along with appropriate references and examples.

Memcached is an open source, high-performance, distributed memory object caching system.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Haskell Programming

This tutorial introduces you to key DynamoDB concepts necessary for creating and deploying a highly-scalable and performance-focused database.

This tutorial will help you understand JSON and its use within various programming languages such as PHP, PERL, Python, Ruby, Java, etc.

Adobe Flex Tutorial i

This tutorial is prepared for beginners to help them understand the basic-to-advanced concepts related to GPRS.

This tutorial provides a basic understanding of how to generate professional reports using Pentaho Report Designer.

Before you start with this tutorial, you need to know basic Java programming.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright DAX

This tutorial will give you a quick start with Consul and make you comfortable with its various components.

SAP Lumira is known as a visual intelligence tool that is used to visualize data and create stories to provide graphical details of the data.

Before you start proceeding with this tutorial, we are assuming that you are already aware about the basics of Web development.

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer. Logstash

This tutorial explains how you can use Gradle as a build automation tool for Java as well as Groovy projects.

You should have a basic understanding of Relational concepts and basic SQL. It will be good if you have worked with any other RDBMS product.

This tutorial provides a basic level understanding of the LOLCODE programming language.

This tutorial provides a basic understanding of the infrastructure and fundamental concepts of managing an infrastructure using Chef.

This tutorial will show you, how to use RSpec to test your code when building applications with Ruby.

This tutorial is designed for software programmers who would like to learn the basics of ASP.NET Core from scratch.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer DBMS

jmeter is an open source testing software. It is 100% pure Java application for load and performance testing.

This tutorial is designed for those who would like to understand the basics of i-mode in simple and easy steps.

This tutorial will take you through simple and practical approaches while learning AOP framework provided by Spring.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design

This tutorial is designed for all Java enthusiasts who want to learn document type detection and content extraction using Apache Tika.

Before proceeding with this tutorial, you should have a good understanding of the fundamental concepts of marketing.

This tutorial covers most of the topics required for a basic understanding of KnockoutJS and explains its various functionalities.

This is a small tutorial where we will cover all the basic steps needed to start with Balsamiq Mockups.

Microsoft Excel is a spreadsheet tool capable of performing calculations, analyzing data and integrating information from different programs.

This tutorial has been designed for beginners interested in learning the basic concepts of UDDI.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Graph Theory

This is an introductory tutorial, which covers the basics of Jython and explains how to handle its various modules and sub-modules.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

The Why And How of Front-End Architecture. Feel the rhythm, feel the rhyme, get on up, it s front-end time

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Laravel

This tutorial discusses the basics of PouchDB along with relevant examples for easy understanding.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright CICS

<link rel="stylesheet" href="

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Avro

This tutorial covers a foundational understanding of IPC. Each of the chapters contain related topics with simple and useful examples.

Dart is an open-source general-purpose programming language. It is originally developed by Google and later approved as a standard by ECMA.

This tutorial will help computer science graduates to understand the basic-to-advanced concepts related to data warehousing.

About Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Euphoria

This tutorial has been prepared for computer science graduates to help them understand the basic-to-advanced concepts related to data mining.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

In this tutorial, we will discuss the architecture, pin diagram and other key concepts of microprocessors.

Before proceeding with this tutorial, you must have a good understanding of Core Java and any of the Linux flavors.

This is a simple tutorial that covers the basics of SAP Business Intelligence and how to handle its various other components.

Try the following example using the Try it option available at the top right corner of the below sample code box

ITEXT. [Document subtitle]

In this brief tutorial, we will be explaining the basics of Elasticsearch and its features.

This tutorial is intended to make you comfortable in getting started with the Firebase backend platform and its various functions.

This tutorial is meant for software developers who want to learn how to lose less time on API integrations!

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. HCatalog

In mainframe environment, programs can be executed in batch and online modes. JCL is used for submitting a program for execution in batch mode.

Leaflet.js is an open-source library using which we can deploy interactive, simple, lightweight and simple web maps.

This tutorial helps the professionals aspiring to make a career in Big Data and NoSQL databases, especially the documents store.

This tutorial is designed for software developers who want to learn how to develop quality applications with clean structure of code.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Apache Bench

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Magento

This tutorial has been designed to help beginners understand the basic concepts of WiMAX.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer HP QC

Spring framework was initially written by Rod Johnson and was first released under the Apache 2.0 license in June 2003.

Webpack 2 The last bundler you would need in Vijay Dharap, Principal Architect, Infosys

This tutorial is designed for all those software professionals who are keen on learning the basics of Clojure and how to put it into practice.

55249: Developing with the SharePoint Framework Duration: 05 days

Learn C programme. C Programming language. Cloud1 C tutorial

This tutorial will help both students as well as professionals who want to make their websites or personal blogs more attractive.

Your essential APEX companion. Marko apexbyg.blogspot.com

Arjen de Blok. Senior Technical Consultant bij ICT Groep ( sinds 1995 Programmeren sinds 1990 Technologiën. Links

Client-side Debugging. Gary Bettencourt

In this tutorial, we will understand how to use the OpenNLP library to build an efficient text processing service.

Transcription:

About the Tutorial Gulp is a task runner that uses Node.js as a platform. It purely uses the JavaScript code and helps to run front-end tasks and large-scale web applications. Gulp builds system automated tasks like CSS and HTML minification, concatenating library files, and compiling the SASS files. These tasks can be run using Shell or Bash scripts on the command line. This tutorial teaches you how to use Gulp to run front-end tasks and large-scale web applications in simple and easy steps. After completing this tutorial, you will find yourself at a moderate level of expertise in using Gulp from where you may take yourself to the next levels. Audience This tutorial has been prepared for beginners to help them understand the basic functionalities of Gulp. Prerequisites For this tutorial, it is assumed that you have prior knowledge of basic software development using Java or any other programming language. It should be of help if you have had some exposure to the software build and deployment process. Disclaimer & Copyright Copyright 2016 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at contact@tutorialspoint.com. i

Table of Contents About the Tutorial... i Audience... i Prerequisites... i Disclaimer & Copyright... i Table of Contents... ii 1. GULP - OVERVIEW... 1 Why Use Gulp?... 1 History... 1 2. GULP - INSTALLATION... 3 System Requirements for Gulp... 3 Installation of Gulp... 3 3. GULP - BASICS... 11 What is a Build System?... 11 Setting Up Your Project... 12 4. GULP DEVELOPING AN APPLICATION... 13 Dependencies Declaration... 13 Creating Task for Dependencies... 13 Running the Task... 14 5. GULP COMBINING TASKS... 15 Installing Plugins... 15 Adding Task to Gulp file... 16 Combining Multiple Tasks... 17 6. GULP - WATCH... 18 Update Default Task... 18 ii

Run Default Task... 18 7. GULP LIVE RELOAD... 20 Installing BrowserSync Plugin... 20 Configuring BrowserSync Plugin... 20 8. GULP OPTIMIZING CSS & JAVASCRIPT... 23 Install Plugins to Optimize CSS and JavaScript... 23 Declare Dependencies and Create Tasks... 23 Run the Tasks... 24 9. GULP OPTIMIZING IMAGES... 25 Install Plugins to Optimize Images... 25 Declare Dependencies and Create Tasks... 25 Run the Tasks... 26 10. GULP USEFUL PLUGINS... 27 HTML & CSS Plugins... 27 JavaScript Plugins... 28 Unit Tests Plugins... 29 Graphics Plugins... 29 Compilers Plugins... 30 Other Plugins... 31 11. GULP CLEANING UNWANTED FILES... 33 Installing del Plugins... 33 Declare Dependencies and Create Tasks... 33 iii

1. GULP OVERVIEW Gulp What is Gulp? Gulp is a task runner that uses Node.js as a platform. Gulp purely uses the JavaScript code and helps to run front-end tasks and large-scale web applications. It builds system automated tasks like CSS and HTML minification, concatenating library files, and compiling the SASS files. These tasks can be run using Shell or Bash scripts on the command line. Why Use Gulp? It is shorter, simpler and faster as compared to other task runner. Uses SASS and LESS as CSS preprocessor. Automatically refreshes page after editing the source files. Easy to understand and build the Gulpfile.js because, it uses pure JavaScript code to build the task. History All the documentation of Gulp is covered by the CC0 license. Initially, Gulp v1.0.0 was released on January 15, 2015, and the current version of Gulp is v3.9.0. Features Provides minification and concatenation. Uses pure JavaScript code. Converts LESS or SASS to CSS compilation. Manages file manipulation in the memory and enhances speed by using the Node.js platform. Advantages Huge speed advantage over any other task runner. 4

Easy to code and understand. Easy to test the web applications. Plugins are simple to use and they are designed to do one thing at a time. Performs repetitive tasks repeatedly such as minifying stylesheets, compressing images, etc. Disadvantages More number of dependencies and is a newcomer compared to Grunt. Using Gulp plugins, you cannot perform multiple tasks. Configuration is not as clean as Grunt. 5

2. GULP INSTALLATION Gulp This article provides a step-by-step procedure of Gulp installation. System Requirements for Gulp Operating System : Cross-platform Browser Support : IE (Internet Explorer 8+), Firefox, Google Chrome, Safari, Opera Installation of Gulp Step (1): We need Node.js to run Gulp examples. To download Node.js, open the link https://nodejs.org/en/, you will see the following screen: Download the latest features version of the zip file. Step (2): Run the setup to install the Node.js on your computer. 6

End of ebook preview If you liked what you saw Buy it from our store @ https://store.tutorialspoint.com 7