Grunt-contrib-watch does not see new files

I wanted to post here before resurrecting errors from the dead in their github, is there something wrong with my file section?

The Watch section is as follows:

watch: {
    files: ['includes/js/source/_*.js'],
    tasks: 'dev',
},

a grunt --verbosegives me the following:

Running "watch" task
Waiting...
Verifying property watch exists in config...OK
Watching includes/js/source/_broken.js for changes.
Watching includes/js/source/_hi.js for changes.
Watching includes/js/source/_jquery_ui_1.10.3_autocomplete.js for changes.
Watching includes/js/source/_menu_toggle.js for changes.
Watching includes/js/source/_thisisatest.js for changes.
Watching includes/js/source for changes.

System Features:
Mac osx 10.9.3 using Vagrant:
Ubuntu 12.04 (php 5.5.11, apache 2.4.9)
node v0.10.28
npm 1.4.9
grunt-cli v0.1.13
grunt v0.4.5

Performing only tasks devworks as expected.

/var/www/themissingsearch $ grunt dev -v
Initializing
Command-line options: --verbose

Reading "GruntFile.js" Gruntfile...OK

Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK

Registering "grunt-contrib-watch" local Npm module tasks.
Reading /var/www/themissingsearch/node_modules/grunt-contrib-watch/package.json...OK
Parsing /var/www/themissingsearch/node_modules/grunt-contrib-watch/package.json...OK
Loading "watch.js" tasks...OK
+ watch

Registering "grunt-contrib-uglify" local Npm module tasks.
Reading /var/www/themissingsearch/node_modules/grunt-contrib-uglify/package.json...OK
Parsing /var/www/themissingsearch/node_modules/grunt-contrib-uglify/package.json...OK
Loading "uglify.js" tasks...OK
+ uglify

Registering "grunt-contrib-concat" local Npm module tasks.
Reading /var/www/themissingsearch/node_modules/grunt-contrib-concat/package.json...OK
Parsing /var/www/themissingsearch/node_modules/grunt-contrib-concat/package.json...OK
Loading "concat.js" tasks...OK
+ concat
Loading "GruntFile.js" tasks...OK
+ default, dev, production

Running tasks: dev

Running "dev" task

Running "concat" task

Running "concat:build" (concat) task
Verifying property concat.build exists in config...OK
Files: includes/js/source/_jquery_ui_1.10.3_autocomplete.js, includes/js/source/_menu_toggle.js, includes/js/source/hellllo.js, includes/js/source/hi.js, includes/js/source/hi2.js, includes/js/source/thisisanewfile.js -> includes/js/themissingsearch.0.1.0.dev.min.js
Options: separator="\n", banner="/*! themissingsearch 06-11-2014 1:36:31 am */\n\n", footer="", stripBanners=false, process=undefined
Reading includes/js/source/_jquery_ui_1.10.3_autocomplete.js...OK
Reading includes/js/source/_menu_toggle.js...OK
Reading includes/js/source/hellllo.js...OK
Reading includes/js/source/hi.js...OK
Reading includes/js/source/hi2.js...OK
Reading includes/js/source/thisisanewfile.js...OK
Writing includes/js/themissingsearch.0.1.0.dev.min.js...OK
File includes/js/themissingsearch.0.1.0.dev.min.js created.

Done, without errors.
+4
source share
1 answer

This turned out to be a problem in Vagrant not Grunt.

Node npm Mac.

+1

Source: https://habr.com/ru/post/1544095/


All Articles