diff --git a/.gitignore b/.gitignore index e120915ae..d3b41f8be 100644 --- a/.gitignore +++ b/.gitignore @@ -30,8 +30,8 @@ npm-debug.log* /www /src/assets/lib -/moodle.*.config.json -!/moodle.example.config.json +/moodle.config.*.json +!/moodle.config.example.json /src/assets/lang/* /src/assets/env.json diff --git a/.vscode/settings.json b/.vscode/settings.json index d8b699e18..e2f79e54b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,7 +2,7 @@ "files.associations": { "moodle.config.json": "jsonc", - "moodle.*.config.json": "jsonc", + "moodle.config.*.json": "jsonc", }, } diff --git a/gulp/task-build-env.js b/gulp/task-build-env.js index 1ccb8dec0..b580a230b 100644 --- a/gulp/task-build-env.js +++ b/gulp/task-build-env.js @@ -25,7 +25,7 @@ function getConfig(environment) { }; const config = parseJsonc(readFileSync(resolve(__dirname, '../moodle.config.json')).toString()); const envSuffixes = (envSuffixesMap[environment] || []); - const envConfigPath = envSuffixes.map(suffix => resolve(__dirname, `../moodle.${suffix}.config.json`)).find(existsSync); + const envConfigPath = envSuffixes.map(suffix => resolve(__dirname, `../moodle.config.${suffix}.json`)).find(existsSync); if (envConfigPath) { const envConfig = parseJsonc(readFileSync(envConfigPath).toString()); diff --git a/gulpfile.js b/gulpfile.js index 2115bad2e..605ac7e40 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -48,5 +48,5 @@ gulp.task('default', gulp.parallel(['lang', 'env'])); gulp.task('watch', () => { gulp.watch(paths.lang, { interval: 500 }, gulp.parallel('lang')); - gulp.watch(['./moodle.config.json', './moodle.*.config.json'], { interval: 500 }, gulp.parallel('env')); + gulp.watch(['./moodle.config.json', './moodle.config.*.json'], { interval: 500 }, gulp.parallel('env')); }); diff --git a/moodle.example.config.json b/moodle.config.example.json similarity index 100% rename from moodle.example.config.json rename to moodle.config.example.json