grunt-contrib-watch

Watching files for changes on Vagrant, file modification times not updating

做~自己de王妃 提交于 2019-12-06 05:48:31
We're trying out Vagrant. We have a web application directory on the host shared with the guest via NFS. While developing the website we quickly started to hit issues. We are running gulp-watch to spot changes to stylesheet and javascript files and run tasks, but changes were not being picked up for up to one minute. Also, Laravel was not noticing that blade templates were being changed, and so was not recompiling them and the old view templates were being shown. I eventually boiled down the problem to a very short PHP script to demonstrate the error. <?php header('Content-Type: text/plain');

grunt-contrib-watch causing Maximum call stack size exceeded

和自甴很熟 提交于 2019-12-06 04:14:43
When I execute the clean task (grunt clean), everything works as expected but when I run the watch task (grunt test), I get the following error: util.js:35 var str = String(f).replace(formatRegExp, function(x) { ^ RangeError: Maximum call stack size exceeded Here's my gruntfile module.exports = (grunt) -> grunt.initConfig pkg: grunt.file.readJSON('package.json') clean: ['tmpDir/'] watch: options: spawn: false src: tasks: ['clean'] files: [ src: 'client/assets/strings/en/str.coffee' ] # plugins grunt.loadNpmTasks('grunt-contrib-clean') grunt.loadNpmTasks('grunt-contrib-watch') # tasks grunt

Grunt Watch repeatedly showing “Warning: must provide pattern”

寵の児 提交于 2019-12-06 02:50:50
问题 I'm having trouble configuring Grunt to watch my project files, rebuild and update a page hosted in a connect server. If I run any of the build tasks and then 'watch' as part of a combined task, then 'watch' seems to get stuck in a loop, endlessly printing the message. Running "watch" task Waiting... Warning: must provide pattern If instead I just run $ grunt watch , it will happily watch my source files and compile/build as appropriate. I think the relevant task configurations are these:

Grunt.js: Fire livereload as soon a files are modified, before task completes

拟墨画扇 提交于 2019-12-05 20:55:24
I'm using Grunt to compile my CSS with compass and trigger the browser livereload. These are my watch tasks: watch: { styles: { options: { spawn: false, }, files: [assetsDir + '/**/*.scss', '!**/*.{dev,min}.scss'], tasks: [ 'concat:styles', 'compass:styles', 'imagemin:styles', 'cssmin:styles', 'clean:styles', ], }, scripts: { options: { spawn: false, }, files: [assetsDir + '/**/*.js', '!**/*.{dev,min}.js'], tasks: [ 'concat:scripts', 'uglify:scripts', ], }, livereload: { options: { livereload: true, spawn: false, }, files: [assetsDir + '/**/*.{dev,min}.{css,js}'], }, }, At the moment the

When I run Grunt, I receive the following message: Local npm module “grunt-contrib-copy” not found. Is it installed?

依然范特西╮ 提交于 2019-12-05 07:55:30
I have been trying to install Grunt. When I run grunt I receive the following list of messages and warnings: Local Npm module "grunt-contrib-copy" not found. Is it installed? Local Npm module "grunt-contrib-uglify" not found. Is it installed? Local Npm module "grunt-contrib-jshint" not found. Is it installed? Local Npm module "grunt-contrib-less" not found. Is it installed? Local Npm module "grunt-contrib-clean" not found. Is it installed? Local Npm module "grunt-contrib-watch" not found. Is it installed? Local Npm module "grunt-contrib-concurrent" not found. Is it installed? Local Npm module

Can the gruntjs watch be restarted on grunt.js file change

◇◆丶佛笑我妖孽 提交于 2019-12-05 01:42:19
Can the grunt watch be restarted when ever there is a change in grunt.js file use case: I am right now in the process of building my grunt process and keep changing the grunt.js file and I have to restart the grunt.js to see if it works. jakerella It looks like this was implemented in version 0.4.0 . You can see the issue here which explains that by simply watching the Gruntfile (even without any tasks) the entire contents of the Grunt setup will be reloaded: watch: { grunt: { files: ['grunt.js'] } } Yes you can achieve it. For example add Gruntfile.js to your files array. watch: { js:{ files:

grunt watch livereload Fatal error: Port 35279 is already in use by another process

时光毁灭记忆、已成空白 提交于 2019-12-04 19:09:39
问题 I'm trying to use livereload with watch. I keep getting the message "Fatal error: Port 35279 is already in use by another process" . I've changed the port for livereload but then nothing reloads. module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), compass: { dist: { options: { cssDir: 'stylesheets', sassDir: 'stylesheets/sass/', imagesDir: 'images', javascriptsDir: 'scripts', require: ['sass-globbing','modular-scale'], force: true } } }, cssmin: {

Grunt Watch repeatedly showing “Warning: must provide pattern”

我怕爱的太早我们不能终老 提交于 2019-12-04 06:20:06
I'm having trouble configuring Grunt to watch my project files, rebuild and update a page hosted in a connect server. If I run any of the build tasks and then 'watch' as part of a combined task, then 'watch' seems to get stuck in a loop, endlessly printing the message. Running "watch" task Waiting... Warning: must provide pattern If instead I just run $ grunt watch , it will happily watch my source files and compile/build as appropriate. I think the relevant task configurations are these: watch: { html: { files: [ '<%= site.partials %>', '<%= site.layouts %>', '<%= site.pages %>' ], tasks: [

Grunt with Compass and Watch compiles slow

这一生的挚爱 提交于 2019-12-03 12:28:32
Grunt takes a quite long to compile the css file, I am not sure if this is normal but regular compass watch takes around 5 seconds. So the question is if there is any way to speed up the compilation time with Grunt or is it better to just stick with compass watch? Running "compass:dist" (compass) task ♀unchanged images/sprite-sf580a96666.png overwrite stylesheets/app.css (3.263s) unchanged images/sprite-sf580a96666.png overwrite stylesheets/app_fr.css (3.289s) Compilation took 11.116s Running "watch" task Completed in 13.974s at Wed Dec 18 2013 13:53:05 GMT-0500 (Eastern Standard Time- Waiting

grunt watch & connect

人走茶凉 提交于 2019-12-03 01:20:11
I am kinda new to grunt and want to use it with Jekyll and some LESS-compiling. My problem now is, I already have fully functioning LESS-comipiling with live reload and watch task and can build my jekyll site through grunt, but how do I run something like the jekyll serve or grunt-connect and grunt watch simultaneously? I want a grunt task that provides the watching of my LESS-files etc, builds the jekyll site and then runs a small web server with grunt-connect or whatever. My Gruntfile.js so far: 'use strict'; module.exports = function (grunt) { grunt.initConfig({ jshint: { options: {