Questions tagged [grunt-contrib-watch]

It is a plugin for gruntjs. It runs predefined tasks whenever watched file patterns are added, changed or deleted.

435 questions
5
votes
1 answer

grunt-contrib-watch does not work with eslint to watch only changed file sets

I can't seem to get ESLint to run only on changed files using grunt-contrib-watch. I was able to do it with JSHint. Any help to get ESLint doing the same would be greatly appreciated.
Sev
  • 15,401
  • 9
  • 56
  • 75
5
votes
2 answers

Get livereload to work with Sails.js

I am new to both Sails and grunt so I might be missing the obvious. I am trying to automatically refresh my sails app in the browser whenever files change. I start the app with sails lift and it runs on the default port 1337. I tried adding…
5
votes
1 answer

Gruntfile with grunt-contrib-watch, browserify, and hbsfy (handlebars) - Automate transform

I pretty new to most all of these tools (grunt, browserify, handlebars). I setup gruntfile.js to watch for saves on a few .js files and then run the default browserify bundle command on them automatically. Here is my current…
tehaaron
  • 2,250
  • 10
  • 31
  • 54
5
votes
2 answers

gulp watch and browserify. watches but doesnt build again

So today is my first day playing around with gulp and grunt or any task runner for js. I got to a place where I was able to change my code in my js files and then run the gulp browserify this works fine. However it was annoying and I wanted to…
Asim Zaidi
  • 27,016
  • 49
  • 132
  • 221
5
votes
2 answers

GIT: how can I watch for local changes in a performant way?

Short description I want to detect local changes in my local git repository in a performant way. This means detecting which files are modified locally, but also the unversioned ones. Any uncommited change / file addition has to be picked up. My…
smets.kevin
  • 1,570
  • 14
  • 17
5
votes
1 answer

How to setup Gruntfile.js to watch for SASS (compass) and JS

I'm new to using gruntjs and nodejs. I wanted to know how can I setup the gruntfile so that it watches both the sass files and the js files compiles using watch. This is what I have so far: module.exports = function ( grunt ) { "use strict"; …
Seed
  • 744
  • 2
  • 10
  • 21
5
votes
2 answers

Odd behavior from grunt-contrib-concat when using globbing pattern

I'm using grunt, and I would like to concat all js files in a certain directory, in a specific order (It's an angular js app, so I want to do my module definitions first, followed by everything else). My grunt concat target looks like: concat: { …
Greg
  • 6,453
  • 9
  • 45
  • 61
5
votes
1 answer

Grunt imagemin - watch multiple files/folders optimise single file?

Is it possible to watch multiple files/folders but optimise only a single file using grunt-contrib-imagemine and grunt-contrib-watch? I tried like this: (part of gruntfile) imagemin: { dist: { cwd: 'images/modules', files:…
hex
  • 669
  • 11
  • 19
5
votes
1 answer

How to modify grunt watch tasks based on the file changed?

I'm writing a node.js program that will watch a directory filled with a large (300-ish) amount of scss projects. Grunt-watch (run either through the node module or on its own, whatever works) will be configured so that whenever a scss file is…
anachronism
  • 53
  • 1
  • 1
  • 4
4
votes
1 answer

need to generate css from scss file on windows 8.1 using gruntjs compass

I am working on a and facing problem to generate tabs.css file from the tabs.scss that is being provided . I have tried all possible options. I am able to successfully generate tabs.js under dist/ folder but failing to generate tabs.css. I have run…
Too Cool
  • 43
  • 4
4
votes
1 answer

Grunt watch/Bower link: What is the most appropriate way to use Grunt watch with Bower link when developing a bower component?

Problem I'm currently working on a project where we have a parent web application (happens to be an AngularJS application) and multiple child Bower modules (containing Javascript, SASS, images, etc.) that are included in the parent using Bower. For…
dabs
  • 41
  • 2
4
votes
1 answer

How to use livereload from multiple servers in a single page? (in particular with Grunt.js connect and watch)

I am trying to get livereload working in one website, triggered by different servers, from different projects. I am using Grunt.js with grunt-contrib-connect and grunt-contrib-watch. Here is an example: ProjectA is currently running a livereload…
Kev
  • 5,049
  • 5
  • 32
  • 53
4
votes
2 answers

Live reload using grunt-contrib-connect and grunt-contrib-watch

I am new to nodeJS and grunt. I have this Gruntfile in this project and I want to do live reload for all the html files in my project, so that I do not have to refresh my browser all the time to detect new changes. Somehow I encounter error with the…
4
votes
0 answers

Schedule Grunt task

I search a way to schedule Grunt task with a Grunt plugin. I found nothing. Is that possible to look at the time with "watch" and execute a task if it's time ?
4
votes
2 answers

grunt watch - use files array format as source

I'm using grunt-contrib-less and grunt-contrib-watch together. My less task uses the files array format to define multiple src and dest's. I'd like to reference those same files from the watch task. Like this: grunt.initConfig({ less: { …
Chad von Nau
  • 4,316
  • 1
  • 23
  • 34