March 27, 2023

Introduction about Gulp.js with beginner’s Guide

Introduction about Gulp.js with beginner’s Guide

 

INTRODUCTION

Swallow is an open-source Javascript tool stash and assignment sprinter which is based on Node.js and NPM and utilized for the improvement of tedious and redundant errands. Many modules are accessible for various undertakings You don't need to program everything without anyone else, there are almost 800 modules prepared for Gulp.js. However, significantly more, Node.js modules can be utilized to assemble the ideal form and advancement process for your necessities.

WHY GULP JS?

As an Engineer or Website specialist, you will probably require a lot of things to construct a cutting edge site: an improvement server, a preprocessor for your Backtalk, Less, or Pointer documents, mechanization to package your JavaScript, instruments to streamline your code, to pack, gather or move things around. Also, assuming that you change something, you believe your records should refresh naturally, or revive the program. You would rather not do this physically


Introduction about Gulp.js with beginner’s Guide

STEP-1: First we need node js which you can download here. And then run below command on terminal

Node -v

STEP-2: Presently after the Establishment of Nodejs. Introduce Swallow js all around the world similarly. Enter the accompanying order in the order brief or terminal

npm install gulp-cli -g

And then check version version

gulp -v


Installation for Project

To set up your undertaking on your PC, make an envelope called "Site page" for instance. You can likewise make a topic organizer in the event that you're utilizing CMS like Drupal. Then, at that point, introduce a hub project by running the typical order. Make a package.json record in your venture registry by

npm init

- Install the gulp package

npm install --save-dev gulp


- Verify your gulp version

gulp --version


Create a new gulpfile

- Create a file gulpfile.js and add the following code for testing

 function mainTask(cb) {

    // place code here

    cb();

 }

exports.default = mainTask


To run the gulp project run this command directory:

gulp

Setting up Gulp for CSS & JS

npm install sass gulp-sass --save-dev


Advantages

  • Simple to code and comprehend
  • The tremendous speed advantage over some other errand sprinter
  • There are a ton of modules accessible which are easy to utilize and they are intended to do each thing in turn.
  • Performs tedious undertakings over and again, for example, minifying templates, packing pictures, and so on.
  • Assuming that you're utilizing Backtalk, you don't need to import documents. You can straightforwardly make a scss document which will bring into CSS by swallow.
Enjoy!

1 comment:

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...