This commit is contained in:
2020-05-27 17:39:32 +02:00
parent 1d2137feda
commit e5cb4d3dbe
8 changed files with 305 additions and 287 deletions

View File

@ -9,6 +9,7 @@
import { dirname, join } from 'path';
import fs from 'fs-extra';
import { run_regex } from '@sapphirecode/utilities';
import hjson from 'hjson';
import { OptionProcess } from '../Option';
import { OptionSource } from './OptionSource';
@ -37,7 +38,7 @@ export class ConfigSource extends OptionSource {
for (const key of Object.keys (data))
obj[key] = data[key];
}
const config = JSON.parse (contents.replace (regex, ''));
const config = hjson.parse (contents);
for (const key of Object.keys (config))
obj[key] = config[key];