<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gulpjs Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/gulpjs/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 05 May 2021 17:09:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Install GulpJS on Ubuntu 20.04</title>
		<link>https://www.osradar.com/install-gulpjs-ubuntu/</link>
					<comments>https://www.osradar.com/install-gulpjs-ubuntu/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 07 May 2021 00:08:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[focal]]></category>
		<category><![CDATA[gulpjs]]></category>
		<category><![CDATA[NodeJS]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=29886</guid>

					<description><![CDATA[<p>Hello, friends. In this post, you will learn how to install GulpJS on Ubuntu 20.04 quickly and easily. In short, Gulp is a tool to automate tasks, mostly on the front-end layer. It is developed in javascript and works on NodeJS so it can run on any system. By using gulp streams, you can apply [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-gulpjs-ubuntu/">Install GulpJS on Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello, friends. In this post, you will learn how to install GulpJS on Ubuntu 20.04 quickly and easily.</p>



<p>In short, <strong><a href="https://gulpjs.com/" target="_blank" rel="noreferrer noopener">Gulp</a> is a tool to automate tasks, mostly on the front-end layer</strong>. It is developed in javascript and works on NodeJS so it can run on any system.</p>



<p>By using gulp streams, you can apply many transformations to your files while in memory before anything is written to the disk—significantly speeding up your build process.</p>



<p>This is why many developers include it in their projects as it automates certain repetitive tasks.</p>



<h2 id="installing-gulp.js-on-ubuntu-20.04"><a name="installing-gulp.js-on-ubuntu-20.04" href="#installing-gulp.js-on-ubuntu-20.04"></a>Installing GulpJS on Ubuntu 20.04</h2>



<h3 id="install-nodejs-on-ubuntu-20.04"><a href="#install-nodejs-on-ubuntu-20.04" name="install-nodejs-on-ubuntu-20.04"></a>Install NodeJS on Ubuntu 20.04</h3>



<p>This tool is built with <a href="https://www.osradar.com/tag/nodejs" target="_blank" rel="noreferrer noopener">NodeJS</a>, so we have to install it on our system.</p>



<p>So, in a terminal, make sure you have Ubuntu up to date.</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p>Also, install the <code>software-properties-common</code> package which is usually already included, but it’s better to be sure.</p>



<pre class="wp-block-preformatted">sudo apt install software-properties-common</pre>



<p>In this post, we will be working with <code>14.x</code> version of NodeJS, so we have to install it via the external repository provided by the developers. To add the repository, we have to run the following command:</p>



<pre class="wp-block-preformatted">curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -</pre>



<p>Now we can install NodeJS by running the following command.</p>



<pre class="wp-block-preformatted">sudo apt install nodejs</pre>



<p>Check the <code>nodejs</code> and <code>npm</code> versions to see if the process was successful.</p>



<pre class="wp-block-preformatted">node --version
v14.16.1</pre>



<pre class="wp-block-preformatted"><code data-origin="<pre&gt;<code&gt;node --version 
v14.16.1

npm --version 
6.14.12
</code&gt;</pre&gt;
<p&gt;">npm --version </code>
<code data-origin="<pre&gt;<code&gt;node --version 
v14.16.1

npm --version 
6.14.12
</code&gt;</pre&gt;
<p&gt;">6.14.12</code></pre>



<h3 id="install-gulp.js-on-ubuntu"><a name="install-gulp.js-on-ubuntu" href="#install-gulp.js-on-ubuntu"></a>Install GulpJS on Ubuntu</h3>



<p>Now we need to create a folder where the Gulp installation will be. Then we need to access it.</p>



<pre class="wp-block-preformatted">mkdir project
cd project</pre>



<p><strong>Note: you can use a name other than project.</strong></p>



<p>Then, start the NodeJS project.</p>



<pre class="wp-block-preformatted">npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help init` for definitive documentation on these fields
and exactly what they do.

Use `npm install &lt;pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (project) 
version: (1.0.0) 
description: Sample for Osradar
entry point: (index.js) 
test command: 
git repository: 
keywords: 
author: 
license: (ISC) </pre>



<p>The output will be a series of questions about the information related to the project we just started.</p>



<p>And the <code>package.json</code> file will be created with the information you supplied.</p>



<p>Now proceed to install <code>gulp-cli</code> which is one of the packages needed to use Gulp.</p>



<pre class="wp-block-preformatted">sudo npm install -g gulp-cli
+ gulp-cli@2.3.0
added 252 packages from 165 contributors in 20.212s</pre>



<p>And install as such, the Gulp package</p>



<pre class="wp-block-preformatted">sudo npm install --save-dev gulp
+ gulp@4.0.2
added 326 packages from 226 contributors and audited 327 packages in 17.689s</pre>



<p>After this, you can verify the installation by running:</p>



<pre class="wp-block-preformatted">gulp --version
CLI version: 2.3.0
Local version: 4.0.2</pre>



<h3 id="testing-the-installation"><a href="#testing-the-installation" name="testing-the-installation"></a>Testing the installation</h3>



<p>Now let’s proceed with an example to see if everything went well, create a file called <code>gulpfile.js</code> with your favorite text editor. I will use <a href="https://www.osradar.com/install-latest-version-nano-ubuntu/" target="_blank" rel="noreferrer noopener">nano</a>.</p>



<pre class="wp-block-preformatted">nano gulpfile.js</pre>



<p>And add the following:</p>



<pre class="wp-block-preformatted">var gulp = require('gulp');

gulp.task('sample', function(done) {
  console.log('Hello World from Osradar');
  done();
});</pre>



<p>In this case, I’ve defined a task that just prints a greeting on the screen.</p>



<p>To run it, just type</p>



<pre class="wp-block-preformatted">gulp sample</pre>



<p>Output:</p>



<pre class="wp-block-preformatted">[18:38:09] Using gulpfile ~/project/gulpfile.js
[18:38:09] Starting 'sample'...
Hello World from Osradar
[18:38:09] Finished 'sample' after 1.64 ms</pre>



<p>So, Gulp is installed and ready to be useful.</p>



<h2 id="conclusion"><a href="#conclusion" name="conclusion"></a>Conclusion</h2>



<p>Gulp contributes to the automation of many tasks that a front-end developer may find tedious. This makes it a valuable tool for many of them. In this post, we have taken you through a series of steps to help you install Gulp on Ubuntu.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-gulpjs-ubuntu/">Install GulpJS on Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-gulpjs-ubuntu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
