It is a plugin for gruntjs. It runs predefined tasks whenever watched file patterns are added, changed or deleted.
Questions tagged [grunt-contrib-watch]
435 questions
4
votes
1 answer
Grunt-contrib-connect: how to launch the server in a specified browser
I'm quite new to the bower / grunt / yeoman environment. I'm trying to customize the app generated by the default yeoman Webapp generator.
Basically when I launch grunt serve the default browser will be launched opening the url served by the grunt…

Leonardo
- 4,046
- 5
- 44
- 85
4
votes
1 answer
Grunt task exits with Bus Error: 10
I am using the following JSHint Grunt task, which is passing okay:
jshint: {
options: {
ignores: ['js/characters/**/*.js','js/libs/**/*.js','js/text.js','js/video.js'],
predef: ['define', 'require'],
…

Mild Fuzz
- 29,463
- 31
- 100
- 148
4
votes
1 answer
Grunt concurrent task outputting nothing
I want my Grunt based setup to run both "test" (i.e. the unit tests) and "server" (i.e. the web server) at the same time, so that I can just do grunt testAndServer to run both (and update both when any file is changed) in the same terminal.
Code…

Klas Mellbourn
- 42,571
- 24
- 140
- 158
4
votes
1 answer
use grunt to restart a phantomjs process
I'm using grunt to have some tasks done every time I change my code ( jshint for example ) and I want to reload a phantomJs process every time I have changes.
The first way I found is to use grunt.util.spawn to run phantomJs the first time.
// …

AntouanK
- 4,880
- 1
- 21
- 26
4
votes
3 answers
How to get grunt-watch to livereload the correct css file?
My goal is to use grunt-watch to live reload my stylesheet whenever I save a change to the stylesheet.
My grunt file is below.
When I run grunt, the file is being watched as expected, but the correct css file is not reloaded.
I can see in the Chrome…

edt
- 22,010
- 30
- 83
- 118
4
votes
1 answer
Is it possible to run a task after the watch task?
I have a PHP-based project that won't run on grunt-php. Instead, I use grunt-exec to run my MAMP server for development.
exec: {
serverup: {
command: '/Applications/MAMP/bin/start.sh'
},
serverdown: {
command:…

raddevon
- 3,290
- 4
- 39
- 49
3
votes
1 answer
Grunt aborted due to warnings
I have already installed "npm" on my local machine. In my Gruntfile.js directory, i'm installing grunt in this way:
npm install grunt
npm install -g grunt-cli
grunt watch
The tasker is running, but i got these warnings:
Here's my gruntfile.js…

Rumen Panchev
- 468
- 11
- 26
3
votes
0 answers
How to make grunt-newer run requirejs on only changed files?
I can only find examples about using grunt-newer with jshint but not requirejs during searching. So I use this config in my grunt config file:
watch: {
options: {
nospawn: true
},
js: {
files: [
…

cmal
- 2,062
- 1
- 18
- 35
3
votes
2 answers
detect file changes in vagrant guest machine
I'm using Vagrant 1.8.4, running Ubuntu 14.04 box. I have installed node v6.2.2 and I'm running windows 10 x64-bit on the host machine, when I change js files and run gulp watch / babel script.js --watch --out-file compiled.js
The problem the…

Ya Basha
- 1,902
- 6
- 30
- 54
3
votes
1 answer
How to serve angular app with grunt?
I am an angular newbie and trying to run grunt with angular. My grunt file looks like this, which plugin or module do I need to add to serve an angular app? I tried grunt-contrib-watch:
module.exports = function(grunt) {
grunt.initConfig({
…

bier hier
- 20,970
- 42
- 97
- 166
3
votes
2 answers
Grunt "watch" Warning: Path must be a string. Received undefined
Grunt "Watch" doesn't want to proceed.
Problem:
Running "watch" task
Waiting...
Warning: Path must be a string. Received undefined
Here is the grunt watch in Gruntfile.js:
watch: {
//Watch files for changes during "grunt serve"
main: {
…

VHax
- 111
- 2
- 7
3
votes
1 answer
Grunt watch task binding in Visual Studio 2015
Problem: I have a problem to configure binding for grunt watch task to always run in Visual Studio 2015.
My goal: I want to watch files for changes and once the change occurs I want to run some task and then resume watch task to look for further…

Andrew B
- 860
- 1
- 14
- 23
3
votes
1 answer
Add delay to Grunt Watch for Less files
I'm using Grunt for compiling Less files on a server, the problem is when I upload the less file over the server using FTP client (Filezilla), the Grunt --watch task starts to compiling the less file from the very first byte that it receives before…

Sohail
- 558
- 1
- 9
- 23
3
votes
2 answers
grunt doesnot reload server on watch livereload
I have been trying to reload the server if the any of the file changes. I can watch the files which has been changed but it does not reload my server.
GruntFile.js
module.exports = function(grunt){
grunt.initConfig({
pkg:…

iamsuman
- 1,413
- 19
- 32
3
votes
2 answers
Grunt watch Running "watch" task Waiting
I have a problem with grunt-watch. When I use "grunt" in terminal outputs
"Running "watch" task Waiting..."
krp-arina@krparina-Lenovo-G555:~/server$ grunt
Running "watch" task
Waiting...
krp-arina@krparina-Lenovo-G555:~/server$ grunt…

bogdan karpus
- 31
- 1
- 3