Questions tagged [gruntjs]

Grunt is a task-based command line build tool and task runner for JavaScript projects.

Grunt is a task-based command-line build tool and task runner for projects, that runs on Node.js and is installed via npm.

It runs on plugins that allow it to manipulate files, other languages, and systems, such as , , , , , and .

Some Useful Links

  1. Grunt GitHub Repo
  2. Grunt API
  3. Grunt Documentation
  4. Grunt Plugins

Related Tags for specific Grunt tools and plugins

9083 questions
2062
votes
7 answers

NPM vs. Bower vs. Browserify vs. Gulp vs. Grunt vs. Webpack

I'm trying to summarize my knowledge about the most popular JavaScript package managers, bundlers, and task runners. Please correct me if I'm wrong: npm & bower are package managers. They just download the dependencies and don't know how to build…
VB_
  • 45,112
  • 42
  • 145
  • 293
625
votes
2 answers

Difference between Grunt, NPM, and Bower (package.json vs bower.json)

When I want to add a package (and check in the dependency into git), where does it belong - into package.json or into bower.json? From what I gather, running bower install will fetch the package and put it in /vendor directory, running npm install…
apprenticeDev
  • 8,029
  • 3
  • 23
  • 25
531
votes
7 answers

Grunt watch error - Waiting...Fatal error: watch ENOSPC

Why do I get the Waiting...Fatal error: watch ENOSPC when I run the watch task ? How do I solve this issue?
kds
  • 28,155
  • 9
  • 38
  • 55
403
votes
13 answers

What is causing this error - "Fatal error: Unable to find local grunt"

I removed the old version of grunt first, then I installed the new grunt version, and then I got this error: D:\www\grunt-test\grunt grunt-cli: The grunt command line interface. (v0.1.4) Fatal error: Unable to find local grunt. If you're seeing…
Ryan Yiada
  • 4,739
  • 4
  • 18
  • 20
358
votes
22 answers

Cannot install NodeJs: /usr/bin/env: node: No such file or directory

I'm trying to install nodeJs into my Ubuntu 14.04 in order to use GruntJs. I've read about Ubuntu different way of doing it (issues?), so this is what I've done in order to install it: sudo apt-get install npm sudo npm install -g grunt-cli Typing…
Rosamunda
  • 14,620
  • 10
  • 40
  • 70
308
votes
8 answers

What does -save-dev mean in npm install grunt --save-dev

I've just started using Grunt.js. It is pretty hard to set up and I am at the point of creating a package.json file. Following this tutorial, it says there are 3 ways to create a package.json file. The first is to do npm install grunt --save-dev But…
Vennsoh
  • 4,853
  • 5
  • 26
  • 41
250
votes
14 answers

Replace a string in a file with nodejs

I use the md5 grunt task to generate MD5 filenames. Now I want to rename the sources in the HTML file with the new filename in the callback of the task. I wonder what's the easiest way to do this.
Andreas Köberle
  • 106,652
  • 57
  • 273
  • 297
220
votes
6 answers

How to tell if an npm package was installed globally or locally

I am installing Grunt, Node.js, npm, Bower, and grunt-cli on Windows 7. The instructions say I should run the install commands with the -g flag for global. How can I check if I used the -g flag when I installed? It will take a lot of time to…
AndraeRay
  • 2,348
  • 2
  • 12
  • 9
209
votes
1 answer

What is the role of src and dist folders?

I'm looking at a Git repository for a jQuery plugin. I want to make a few changes for use in my own project, but when I opened up the repository it had a structure I've never seen before. I'm not sure which files to use / copy into my own…
Don P
  • 60,113
  • 114
  • 300
  • 432
209
votes
12 answers

Have Grunt generate index.html for different setups

I'm trying to use Grunt as a build tool for my webapp. I want to have at least two setups: I. Development setup - load scripts from separate files, without concatenation, so my index.html would look something like: …
Dmitry Pashkevich
  • 13,431
  • 9
  • 55
  • 73
124
votes
2 answers

Task Runners (Gulp, Grunt, etc) and Bundlers (Webpack, Browserify). Why use together?

I am trying to learn about technologies including Grunt, Gulp, Webpack, Browserify, but I did not feel that there is much difference between them. In other words, I feel Webpack can do everything that a task runner does. But still I got a huge…
invincibleDudess
  • 1,762
  • 2
  • 11
  • 18
122
votes
7 answers

npm windows install globally results in npm ERR! extraneous

I am trying some "cookbook-examples" on the site 'http://tech.pro/tutorial/1190/package-managers-an-introductory-guide-for-the-uninitiated-front-end-developer#front_end_developers'. You should not have to look there now, but I thought it could be…
Meru
  • 1,595
  • 2
  • 13
  • 15
109
votes
4 answers

Karma: Running a single test file from command line

So, I've been looking all over for this, found "similar" answers here, but not exactly what I want. Right now if I want to test a single file with karma, I need to do fit(), fdescribe() on the file in question... However, what I do want is to be…
Gonçalo Vieira
  • 2,249
  • 2
  • 19
  • 39
103
votes
6 answers

grunt: command not found when running from terminal

I'm new to Grunt. I'm trying to configure Grunt on my Mac OSX Lion. I followed the instructions here and then created a project folder that contains the files below. When I try to run by typing "grunt" into terminal I get command not found. I've…
user686483
  • 1,584
  • 6
  • 18
  • 29
102
votes
7 answers

Using node-inspector with Grunt tasks

Does someone used node-inspector with Grunt for application debugging? If not, Can you recommend a debugging tool for Grunt based apps? I'm working with nodejs for a server side app and I have Grunt to use separated tasks (this is because users can…
JuanO
  • 2,500
  • 3
  • 18
  • 20
1
2 3
99 100