GruntJS in Simple English Part3

  1. Creating the package.json file first

  2. Enter the name, version, development dependencies
  3. Install grunt locally using this command [npm install grunt –save-dev]
  4. After installed grunt one folder created in root folder called node_modules,Inside that grunt installed locally
  5. After grunt installed you can install the grunt clean module [npm install grunt-contrib-clean –save-dev]

    Refer more
  6. Then create the Gruntfile.js file [Refer this link]

  7. For sample purpose created the folder called ToBeCleaned and inside the folder create some dummy text files and folders
  8. I have created 4 text files and 5 folders [Refer below Attachment]
  9. filesAndFolders

  10. Now run the grunt [grunt default -v]
  11. The hyphen [-v] will basically just run this in verbose mode so I can see everything being outputted. [Refer the below image]
  12. filesAndFoldersCleaned