Setup


We are using gulp which allows to have complete automation for build flow. In case if you don't know - Gulp is a toolkit for automating painful or time-consuming tasks in development workflow, so you can stop messing around and build something. You can read it more about it here. Please follow below steps to install and setup all prerequisites:

  • Install nodejs (v9.11.2) and gulp (v3.9.1)

    If you have already installed nodejs and gulp, you can skip this step

    1. Make sure to have the Node.js installed & running on your computer. If you are using the latest version (10x), you might run into some issue based on your operating system. We would encourage to install and use the specified version only.
    2. Open your terminal and install gulp globally. You can use the command npm install -g gulp@3.9.1
  • Install dependencies

    Go to your folder and enter the command npm install. This would install all required dependencies in node_modules folder.

After you finished with above two steps, you can run the automated tasks (as described below) to build the application.

Command Description
gulp It runs the watch command and starts a development server at 'http://localhost:3000'. You can modify your html, sass and js files and it automatically compiles the sass into css, sync your html or js file change.
gulp build Build production ready folder. It compiles end-to-end files and copied into dist folder.

FAQs

  • I am already having nodejs v10x and can't change for some reason, what should I do?

    Try to force the natives dependency in the package-lock.json to a newer version while installing dependencies. On windows you might run into issue while it builds node-sass, in that case we would suggest to use node 9x version.

  • I am getting following issues while running npm install, what should I do?

    Error: ENOENT: no such file or directory, scandir '/root/website/node_modules/node-sass/vendor'

    If you are getting this issue, then there could be a problem due to multiple issues. Try following work around:

    • 1. Run the command npm rebuild node-sass to re-install node-sass
    • 2. Delete node_modules folder and re run the command npm install