简体   繁体   English

grunt-contrib-watch没有看到新文件

[英]grunt-contrib-watch not seeing new files

I wanted to post here before resurrecting bugs from the dead on their github, is there anything malformed with my files section? 我想在他们的github上从死者身上复活bug之前在这里发帖,我的文件部分有什么格格不入吗?

The Watch section is as follows: Watch部分如下:

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

a grunt --verbose gives me the following: grunt --verbose给了我以下内容:

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 Specs: 系统规格:
Mac osx 10.9.3 with Vagrant running: 运行Vagrant的Mac osx 10.9.3:
Ubuntu 12.04 (php 5.5.11, apache 2.4.9) Ubuntu 12.04(php 5.5.11,apache 2.4.9)
node v0.10.28 节点v0.10.28
npm 1.4.9 npm 1.4.9
grunt-cli v0.1.13 grunt-cli v0.1.13
grunt v0.4.5 咕噜v0.4.5

Running just the dev task appears to be working as expected 仅运行dev任务似乎按预期工作

/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.

This turned out to be an issue within Vagrant not Grunt. 这在Vagrant而不是Grunt中是一个问题。

The fix was to uninstall Node & npm on my vagrant box and installed everything on my mac proper. 解决方法是在我的流浪盒上卸载Node&npm并在我的mac上安装所有内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM