[react-packager] Add asset extensions to file watch glob in the project root

This commit is contained in:
Amjad Masad 2015-04-17 09:10:45 -07:00
Родитель 1883ba535c
Коммит 2975f26e80
1 изменённых файлов: 6 добавлений и 4 удалений

10
packager/react-packager/src/Server/index.js поставляемый
Просмотреть файл

@ -71,13 +71,17 @@ function Server(options) {
this._packages = Object.create(null);
this._changeWatchers = [];
var assetGlobs = opts.assetExts.map(function(ext) {
return '**/*.' + ext;
});
var watchRootConfigs = opts.projectRoots.map(function(dir) {
return {
dir: dir,
globs: [
'**/*.js',
'**/package.json',
]
].concat(assetGlobs),
};
});
@ -86,9 +90,7 @@ function Server(options) {
opts.assetRoots.map(function(dir) {
return {
dir: dir,
globs: opts.assetExts.map(function(ext) {
return '**/*.' + ext;
}),
globs: assetGlobs,
};
})
);