Showing posts with label NPM. Show all posts
Showing posts with label NPM. Show all posts

Thursday, October 24, 2019

Developing Liferay-7.1.0 Theme using Node, NPM, Yeoman and Gulp

Hi

In this post I am going to discuss how to develop liferay-7.1.0 theme using Node, NPM, Yeoman and Gulp

Prerequisites
Name Version Download Page Direct Link
Node 11.15.0 Node Package Manager Download Page Click to Download Directly


Installation of Node Package Manager
Download the Node Package Manager archive from the links given in the prerequisite section.... the installation of Node Package Manager has been described in an other blog for you to refer, please refer the link below for the installation.

Though the versions are different, the installation procedure is same as that of the one given in the link.

Node Package Manager Installation

The following sections or the portions of the blog assumes the Node Package Manager is installed and working as expected...

Installation of Yeoman and Gulp
For the Installation of Yeoman and Gulp, you can refer the next blog post from the link given below...

Yeoman and Gulp Installation

Installation of Liferay Theme Generator
After installing the required packages for creating themes in Liferay-7.1.0, now is the time to install the Theme Generator... to do this

Open up a terminal and execute the command given below
> npm install -g generator-liferay-theme@^8.x.x
The execution of the above command would result something like the one given in the image below...


With that we have concluded the installation of Liferay Theme Generator

The following sections details the actual theme creation for Liferay-7.1.0

Creating Themes...
Open a terminal window and move to any directory of your choice to create themes

Fire the command below to have your theme created
> yo liferay-theme
the above command would ask you a set of questions provide answers to those for the successful creation of one, the sampled one is given below for you to refer...




This concludes the successful creation of the theme...

Now the next part is important, i.e deploying the theme.. please follow the section below to deploy the theme created.

Deploying the Theme
Move to the root directory of the theme which we did create and fire the command below...

Make sure your liferay portal is up and running.

> gulp deploy

if the command execution is successful, then you would have something as depicted in the images given below...




On the server console, the deployment of the new theme can be verified as depicted below...



With that we have concluded the theme development of liferay-7.1.0 using NPM, Yeoman and Gulp.

Hope you find this article useful.

Thanks.

Wednesday, October 23, 2019

Installation of Node Package Manager in Ubuntu

Hi,

In this blog article I would like to discuss the installation procedures for installing Node Package Manager shortly called as NPM in ubuntu.

Prerequisites
Name Version Download Page Direct Link
Node 12.13.0 LTS Node Package Manage Download Page Click to Download Directly

This post mainly focuses on installation of Node-12.13.0 LTS and its working, the procedures followed for the installation of this version and the forth coming version of Node would remain the same.

Using the links given above in the prerequisite section download the package in one of your preferred locations and extract it.

Open up a terminal and execute the following commands one after the other...

Moving the prompt to the user's home directory
> cd

Editing the .bashrc file using gedit
> gedit .bashrc

In case if you do not have gedit text editor, you can use any text editor of your choice

Append the file with the following lines
NODE_HOME=<INSTALLATION-PATH-OF-NODE>
PATH=$PATH:$NODE_HOME/bin

* installation path is the location where you have extracted the node tar package

With that we have concluded the installation of Node

Use the following command to verify that the installation has happened correctly....

> which node
the above command would return the path of the executable as something shown in the picture given below...


> node --version
the above command would return the version of Node installed as given in the image below....


> which npm
the above command would return the path of the executable as something shown in the picture given below...


> npm --version
the above command would return the version of NPM installed as given in the image below....


With this we have concluded the installation of Node and NPM in Ubuntu.

Hope you had great time reading...

Ciao

Tuesday, October 22, 2019

How to completely remove NodeJs and NPM in Ubuntu

Hi,

In this post I am going to write about how to completely remove NodeJs and NPM from ubuntu.... I was having Ubuntu-16.04 as my operating system during installation of NodeJs and NPM, this procedure should be fine for future versions and to some extent recent past versions of ubuntu

With that said, lets get into action

Assuming you have installed NodeJs and NPM using apt-get, the following is the procedure to completely remove NodeJs and NPM from your presonal computer....

Open up a terminal, and fire the command below...
> sudo apt-get update
The above command will make the local repository in sync with the remote repository for the other commands to have a smooth process.

Once the update is done, fire the following commands one by one at the terminal

Removing NodeJs

> sudo apt-get purge --auto-remove nodejs
> sudo apt-get purge nodejs
> sudo apt-get autoremove

The above commands ensures the removal of NodeJs but it will not ensure the removal of files installed during installation, after the removal of NodeJs there would be some files left orphan in the system, to remove those file(s) proceed with the following commands...

> sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node opt/local/include/node /opt/local/lib/node_modules

To remove node or node_modules from /usr/local/lib
> sudo rm -rf /usr/local/lib/node*

To remove node or node_modules directories from /usr/local/include
> sudo rm -rf /usr/local/include/node*

To remove any node file or dir from /usr/local/bin
> sudo rm -rf /usr/local/bin/node*

Removing Node Package Manager
To remove NPM, fire the following commands at the prompt...

> sudo apt-get purge --auto-remove npm
> sudo apt-get purge npm
> sudo apt-get autoremove

Well with this I conclude this post, if you find any discrepancies please comment it in the comment section below....

As always, hope you had good time reading...

Ciao.

Installing Python and Creating Virtual Environment for Pip for package installations in Ubuntu

Hi, In this post we are going to look at how to install Python and PIP and installing packages in virtual environments.. Without wasting...