Skip to content

Commit 58fe518

Browse files
committed
Merge remote-tracking branch 'FND/watch-tweaks'
2 parents 590c0e1 + 9905a2b commit 58fe518

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

.jshintrc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
{
2+
"node": true,
23
"undef": true,
34
"unused": true,
45
"laxbreak": true,
56
"laxcomma": true,
6-
"proto": true,
7-
"globals": {
8-
"console": false,
9-
"exports": true,
10-
"process": false,
11-
"require": false,
12-
"module": false,
13-
"__dirname": false
14-
}
7+
"proto": true
158
}

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ var path = require('path');
114114
var postcss = require('postcss');
115115
var processor = postcss(plugins);
116116

117+
// hook for dynamically updating the list of watched files
118+
global.watchCSS = function() {};
117119
if (argv.watch) {
118120
var watchedFiles = inputFiles;
119121
var watcher = require('chokidar').watch(watchedFiles);
@@ -123,17 +125,14 @@ if (argv.watch) {
123125
});
124126
});
125127

126-
global.watchCSS = function(files) { // jshint ignore:line
128+
global.watchCSS = function(files) {
127129
watcher.unwatch(watchedFiles);
128130
watcher.add(files);
129131
watchedFiles = files;
130132
};
131-
} else {
132-
global.watchCSS = function() {}; // jshint ignore:line
133133
}
134134
async.forEach(inputFiles, compile, onError);
135135

136-
137136
function compile(input, fn) {
138137
var output = argv.output;
139138
if (argv.dir) {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"jshint": "^2.6.3",
33-
"postcss-import": "^6.1.1",
33+
"postcss-import": "^7.1.0",
3434
"postcss-url": "^4.0.0"
3535
}
36-
}
36+
}

0 commit comments

Comments
 (0)