Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  6] [ 2]  / answers: 1 / hits: 37103  / 11 Years ago, thu, march 21, 2013, 12:00:00

My code folders and files are like this, you never know how many sub folders in it:


js/sub1/a.js
js/sub2/b.js
js/sub3/sub31/c.js
js/sub4/sub41/sub411/d.js

Here is part of the Gruntfile.js:


grunt.initConfig({
watch: {
src: {
files: ['js/*.js'],
tasks: []
}
}
});

Grunt can't watch the changes of my all JavaScript files by using 'js/*.js'. So how to write the correct file path expression?


More From » gruntjs

 Answers
0

Per the official documentation on file globbing, to watch for changes for files of a certain file type in the directory path and its subdirectories, you'll want:



files: ['js/**/*.js']

[#79444] Wednesday, March 20, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
alejandro

Total Points: 231
Total Questions: 102
Total Answers: 107

Location: Jordan
Member since Wed, Jun 17, 2020
4 Years ago
alejandro questions
Mon, Jul 18, 22, 00:00, 2 Years ago
Fri, Sep 18, 20, 00:00, 4 Years ago
Thu, Sep 10, 20, 00:00, 4 Years ago
;