Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Commit 73539d0

Browse files
committed
Merge pull request #66 from Cactucs/master
Watch all sources in config
2 parents 0723188 + d34f205 commit 73539d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/tasks/watch_sources.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ module.exports = function(gulp, config, watch) {
1313
})
1414
}
1515

16+
var fileExtensions = ['css','styl','scss','less','js','jsx','es6','es','coffee','jade','json','html','htm']
1617
Object.keys(mapping).forEach(function(key) {
1718
mapping[key] = mapping[key].map(function(i) {
1819
var ext = '.' + i.replace(/^\./, '') // remove . from the beginning of the string
20+
if(fileExtensions.indexOf(key) == -1) {
21+
fileExtensions.push(ext.substring(1))
22+
}
1923
return new RegExp(ext + '$')
2024
})
2125
})
@@ -27,7 +31,7 @@ module.exports = function(gulp, config, watch) {
2731
var minimatch = require('minimatch')
2832
var path = require('path')
2933
var runcmd = require('../helpers/runcmd')
30-
var glob = '**/*.{css,styl,scss,less,js,jsx,es6,es,coffee,jade,json,html,htm}'
34+
var glob = '**/*.{' + fileExtensions.join() + '}'
3135
var globDist = config.dist_folder + '/**/*.*'
3236

3337

0 commit comments

Comments
 (0)