|
@@ -41,9 +41,13 @@ class CrowiDev {
|
|
|
*/
|
|
*/
|
|
|
requireForAutoReloadServer() {
|
|
requireForAutoReloadServer() {
|
|
|
// load all json files for live reloading
|
|
// load all json files for live reloading
|
|
|
- fs.readdirSync(this.crowi.localeDir).map((dirname) => {
|
|
|
|
|
- require(path.join(this.crowi.localeDir, dirname, 'translation.json'));
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ fs.readdirSync(this.crowi.localeDir)
|
|
|
|
|
+ .filter(filename => {
|
|
|
|
|
+ return fs.statSync(path.join(this.crowi.localeDir, filename)).isDirectory();
|
|
|
|
|
+ })
|
|
|
|
|
+ .map((dirname) => {
|
|
|
|
|
+ require(path.join(this.crowi.localeDir, dirname, 'translation.json'));
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|