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
69
votes
6 answers

How to uninstall npm package?

I've installed grunt using sudo npm install grunt and now I can't remove it. I've tried: $ sudo npm uninstall grunt But it gives me a WARN: npm WARN uninstall not installed in /home/kuba/projects/node_modules: "grunt-cli" I've also tried rm,…
jcubic
  • 61,973
  • 54
  • 229
  • 402
68
votes
1 answer

How grunt watch files in sub folders?

My code folders and files are like this, you never know how many sub folders in it: js/sub1/a.js js/sub2/b.js js/sub3/sub31/c.js js/sub4/sub41/sub411/d.js Here is part of the Gruntfile.js: grunt.initConfig({ watch: { src: { …
HOT.CHO
  • 769
  • 2
  • 6
  • 7
67
votes
5 answers

How to compile .sass files on save in Visual Studio 2015

How can one get a full sass (i.e. scss) precompiler environment up and running in Visual Studio 2015? This is a sibling question to this one concerning less.
Nicholas Petersen
  • 9,104
  • 7
  • 59
  • 69
65
votes
1 answer

Node glob pattern for every .js file except .spec.js

I am looking for a better glob pattern for usemin, i want to to find all .js files but exclude the .spec.js files. I have the following solution so far. The solution i have at the…
roughcoder
  • 1,190
  • 1
  • 8
  • 11
65
votes
15 answers

Fontawesome is not working when project is built with grunt

I'm using the font library font awesome. It works when the project is not built/uglified with grunt. But when I'm building the project with grunt it's not working. I get this error in console: .../fonts/fontawesome-webfont.woff?v=4.0.3 404 (Not…
Joe
  • 4,274
  • 32
  • 95
  • 175
64
votes
2 answers

what does grunt "test command" do on npm init

I'm trying to learn grunt. When I run npm init, I get a prompt in the process of creating a package.json file that asks for "test command" - I'm not sure how to utilize this, or what it's expecting. It doesn't seem to be well documented. If I leave…
mheavers
  • 29,530
  • 58
  • 194
  • 315
63
votes
5 answers

Automate npm and bower install with grunt

I have a node / angular project that uses npm for backend dependency management and bower for frontend dependency management. I'd like to use a grunt task to do both install commands. I haven't been able to figure out how to do it. I made an attempt…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
63
votes
3 answers

What's the purpose of gruntjs server task?

I'm learning how to propel use gruntjs. I found the server task but I can't get the point. Can i use the server task mapping concatenated/minified files to test my application (uses backbone.js) without moving or placing source files in web server…
gremo
  • 47,186
  • 75
  • 257
  • 421
62
votes
2 answers

What's the difference between concat and uglify and minify?

What's the difference between concat, uglify, and minify tasks in grunt? I set up an uglify task for all of my site's javascript tasks, and it seemed to both minify and concatenate them. Grunt's site has a great description for how to configure each…
mheavers
  • 29,530
  • 58
  • 194
  • 315
59
votes
9 answers

How to run two grunt watch tasks simultaneously

Is it possible to run two watch tasks simultaneously? I understand that I can have any number of tasks I want inside watch settings and just launch grunt watch and it will watch all of them, like this ... watch: { A: { files:…
Vitalii Korsakov
  • 45,737
  • 20
  • 72
  • 90
58
votes
7 answers

How to deploy node app that uses grunt to heroku

I'm using grunt and also grunt plugins like grunt-contrib-copy, grunt-contrib-mincss (that listed as npm dependencies for my application). Also I don't commit npm_modules folder and public folder, where all generated files are. And I can't figure…
ValeriiVasin
  • 8,628
  • 11
  • 58
  • 78
58
votes
11 answers

how to config grunt.js to minify files separately

there are some js files in static/js/ 1. a.js 2. b.js 3. c.js how to config grunt.js to get below files: 1. a.min.js 2. b.min.js 3. c.min.js as far, I have to type specific file name: min: { dist: { src: …
looping
  • 1,141
  • 3
  • 11
  • 20
56
votes
17 answers

Cannot find module 'internal/fs' after upgrading to node 7

We've recently tried to upgrade to node v7.0.0 on our build server, but started to have issues during the application build task failing on the "bower_concat" step: Loading "bower-concat.js" tasks...ERROR Error: Cannot find module…
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
56
votes
7 answers

How can I make Heroku install devDependencies?

I would like to have Heroku build my app after I push it so that I don't have to push the build folder up every time I make a change. However Heroku only installs the dependencies from the package.json and grunt (my build tool) and all of its…
ionox0
  • 1,101
  • 2
  • 14
  • 21
56
votes
11 answers

Grunt on Windows 8: 'grunt' is not recognized

I'm having a problem running Grunt from the command line on my Windows 8 machine. My research indicates the most common solution is to install grunt-cli, since Grunt is no longer global. I also need to make sure I actually install the Grunt task…
Daniel Attfield
  • 2,024
  • 2
  • 24
  • 40