Moved config example file location

This commit is contained in:
2022-03-05 19:43:24 +07:00
parent 22e4a5ddac
commit abc2f3053c
4 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -1,8 +1,7 @@
# See http://help.github.com/ignore-files/ for more about ignoring files. # See http://help.github.com/ignore-files/ for more about ignoring files.
/build /build
/configs/* /configs
!/configs/*.example.json
# compiled output # compiled output
/dist /dist
+1 -1
View File
@@ -39,7 +39,7 @@ class Configuration {
private copyExampleIfNotExists(file: string): void { private copyExampleIfNotExists(file: string): void {
const dir = path.join(process.cwd(), 'configs/'); const dir = path.join(process.cwd(), 'configs/');
if (!fs.existsSync(path.join(dir, file))) { if (!fs.existsSync(path.join(dir, file))) {
fs.copyFileSync(path.join(process.cwd(), 'configs/', `${file.replace('.json', '.example.json')}`), path.join(dir, file)); fs.copyFileSync(path.join(process.cwd(), 'configs_example/', `${file.replace('.json', '.example.json')}`), path.join(dir, file));
} }
} }