Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Give the opportunity to watch SASS dependencies (#1) #541

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions gulpfile.js/tasks/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,17 @@ var watchTask = function() {
if(taskConfig) {
var srcPath = projectPath(PATH_CONFIG.src, taskPath.src)
var globPattern = '**/*' + (taskConfig.extensions ? '.{' + taskConfig.extensions.join(',') + '}' : '')
watch(path.join(srcPath, globPattern), watchConfig, function() {
require('./' + taskName)()
var watchPath = [];
watchPath.push(path.join(srcPath, globPattern));

if (taskConfig.sass !== undefined && taskConfig.sass.includePaths !== undefined) {
taskConfig.sass.includePaths.forEach(function (includePath) {
watchPath.push(path.join(includePath, globPattern));
});
}

watch(watchPath, watchConfig, function () {
require('./' + taskName)()
})
}
})
Expand Down