Skip to content

How to run gulp for this kit

Dana edited this page Oct 10, 2018 · 1 revision

(For beginners) How to run gulp for the kit

For Windows users who never had any experience with gulp, please try out my tutorial for developers like you. For non-Windows users, it's technically easier to run commands like npm/gulp on UNIX/LINUX system.

0. Terminal. Do this first if you're Windows user.

Skip this if you're on macOS or Linux, you have a terminal preinstalled on your operating system. A terminal is available out of the box on Linux and OS X. You need a terminal to run npm and gulp. Windows have terminals out of the box as well but default cmd and PowerShell is not sustainable for development work.

I recommend you to install cmder as a replacement for Windows terminal. Personally I use their custom cmd.exe (cmd /k "%ConEmuDir%\..\init.bat" because it includes many UNIX libraries and you can run wget and other UNIX commands. However, if you prefer, you can run PowerShell, cygwin, Babun, mitty, MinGW and more under cmder. Very nifty and powerful tool. I want to note Babun, the powerful and cygwin based for Windows and runs ZSH on default.

If you have a runtime error when starting cmder, you'll probably need to install VS 2015, see the issue here.

Notice: If you still have trouble installing terminal from above, I wrote a more detailed guide here in beginning gulp tutorial for Windows users.

1. npm

npm, the gulp.js dependent package

Install npm. This is available for all operating system.

For Windows, during the installation, be sure 'add to PATH' is included (image). When installed, restart cmder and enter npm in a terminal to see if it's working properly, as in it should tell you the usage information. If it does, proceed to the next step.

2. gulp

  1. Install gulp globally with this terminal command: npm install --global gulp. Windows users can run this script as long npm is properly installed.

Finally, as described in above Gulp condensed commands section:

  1. cd to a folder where gulpfile.js is at (ex. cd gulp, cd bootstrap-scss-gulp-kit/gulp/, or check your current file list via ls and ls -la to help you to find the gulp folder)
  2. Run npm install --save-dev and allow it to install all modules this gulpfile.js required to run.
  3. When the installation is completed, run gulp. Default browser should open the index.html, on localhost with unique port, as per BrowserSync script, and will refresh on (watched) file change/save during the development.

If you still have difficulties following this instruction, if not on Windows, please open an issue, and if on Windows, please go to my tutorial here. If it still doesn't work out, please open an issue on the linked tutorial repo and mention what you tried to troubleshoot.