Pangong
  • Getting Started
  • Change log
  • Introduction
    • Installation
    • NPM
    • SASS
    • Grunt
    • API Reference
    • Browser Support
    • Jquery 3.3.1
    • Bootstrap 4.1.3
  • Menu Styles
    • Vertical Menu Style
    • Horizontal Menu Style
    • Horizontal Menu with Top nav
  • Application
    • Chat
    • Calendar
    • Email
  • Social Feed
    • Twitter Feed
  • components
    • Gallery
    • Activity
    • Embeds
    • Colors
  • forms
    • Toggles
    • Range slider
    • Select2
    • Input Spinner
    • Date Picker
    • Color Picker
    • Editor
  • Tables
    • Data Table
    • Responsive Table (tablesaw)
    • Editable Table
  • Charts
    • Morris Chart
    • E-Charts
    • Sparkline Chart
    • Peity Charts
    • Easy Pie Chart
  • Maps
    • Vector Map
    • Google Map
  • ...
    • Credits
Powered by GitBook
On this page
  • Installing Grunt
  • Commands

Was this helpful?

  1. Introduction

Grunt

Grunt is a JavaScript task runner, a tool used to automatically perform frequent tasks such as minification, compilation, unit testing, and linting.

PreviousSASSNextAPI Reference

Last updated 6 years ago

Was this helpful?

Installing Grunt

To install grunt first you must have , NodeJS will have npm (node packaged modules) Run the following commands

  • Install grunt-cli globally by running the following command npm install -g grunt-cli

  • Gruntfile.js file is a valid JavaScript or CoffeeScript file that belongs in the root directory of your project, next to the package.json file, and should be committed with your project source.

  • Navigate to the root directory of your project, then run npm install.

Once you have successfully setup now you can use Grunt CLI commands to automate your task

Commands

grunt dist

This will automatically copy all the assets from node_modules to vendors folder

grunt sass

This will compile all the sass files to dist/css/style.css

grunt watch

This will automatically compile the sass files on changes

grunt

This will run 4 grunt tasks:

  1. Sass file compilation

  2. Jshint check

  3. Watch for the changes in sass files

Your are free to customize the Grunt task to your need by editing the Gruntfile.js in the root directory.

It will connect web server on

NodeJs installed
http://localhost:9000