commit
1ea3bc1ef9
|
@ -146,7 +146,7 @@
|
||||||
"angular-mocks": "1.4.7",
|
"angular-mocks": "1.4.7",
|
||||||
"auto-release-sinon": "1.0.3",
|
"auto-release-sinon": "1.0.3",
|
||||||
"babel-eslint": "4.1.8",
|
"babel-eslint": "4.1.8",
|
||||||
"chokidar": "1.0.5",
|
"chokidar": "1.4.3",
|
||||||
"eslint": "1.10.3",
|
"eslint": "1.10.3",
|
||||||
"eslint-plugin-mocha": "1.1.0",
|
"eslint-plugin-mocha": "1.1.0",
|
||||||
"expect.js": "0.3.1",
|
"expect.js": "0.3.1",
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import cluster from 'cluster';
|
import cluster from 'cluster';
|
||||||
const { join } = require('path');
|
const { join, resolve } = require('path');
|
||||||
const { format: formatUrl } = require('url');
|
const { format: formatUrl } = require('url');
|
||||||
import Hapi from 'hapi';
|
import Hapi from 'hapi';
|
||||||
const { debounce, compact, get, invoke, bindAll, once, sample } = require('lodash');
|
const { debounce, compact, get, invoke, bindAll, once, sample, uniq } = require('lodash');
|
||||||
|
|
||||||
import Log from '../Log';
|
import Log from '../Log';
|
||||||
import Worker from './worker';
|
import Worker from './worker';
|
||||||
|
@ -85,14 +85,19 @@ module.exports = class ClusterManager {
|
||||||
const chokidar = require('chokidar');
|
const chokidar = require('chokidar');
|
||||||
const fromRoot = require('../../utils/fromRoot');
|
const fromRoot = require('../../utils/fromRoot');
|
||||||
|
|
||||||
this.watcher = chokidar.watch([
|
const watchPaths = uniq(
|
||||||
'src/plugins',
|
[
|
||||||
'src/server',
|
fromRoot('src/plugins'),
|
||||||
'src/ui',
|
fromRoot('src/server'),
|
||||||
'src/utils',
|
fromRoot('src/ui'),
|
||||||
'config',
|
fromRoot('src/utils'),
|
||||||
|
fromRoot('config'),
|
||||||
...extraPaths
|
...extraPaths
|
||||||
], {
|
]
|
||||||
|
.map(path => resolve(path))
|
||||||
|
);
|
||||||
|
|
||||||
|
this.watcher = chokidar.watch(watchPaths, {
|
||||||
cwd: fromRoot('.'),
|
cwd: fromRoot('.'),
|
||||||
ignored: /[\\\/](\..*|node_modules|bower_components|public|__tests__)[\\\/]/
|
ignored: /[\\\/](\..*|node_modules|bower_components|public|__tests__)[\\\/]/
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue