You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-11-23 22:24:44 +02:00
improving benchmark
This commit is contained in:
39
benchmark/BMConfig.ts
Normal file
39
benchmark/BMConfig.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/* tslint:disable:no-inferrable-types */
|
||||
import * as path from 'path';
|
||||
import {ConfigClass, ConfigClassBuilder} from 'typeconfig/node';
|
||||
import {ConfigProperty} from 'typeconfig/common';
|
||||
|
||||
|
||||
@ConfigClass({
|
||||
configPath: path.join(__dirname, './../bm_config.json'),
|
||||
saveIfNotExist: true,
|
||||
attachDescription: true,
|
||||
enumsAsString: true,
|
||||
softReadonly: true,
|
||||
cli: {
|
||||
enable: {
|
||||
configPath: true,
|
||||
attachState: true,
|
||||
attachDescription: true,
|
||||
rewriteCLIConfig: true,
|
||||
rewriteENVConfig: true,
|
||||
enumsAsString: true,
|
||||
saveIfNotExist: true,
|
||||
exitOnConfig: true
|
||||
},
|
||||
defaults: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
})
|
||||
export class PrivateConfigClass {
|
||||
@ConfigProperty({description: 'Images are loaded from this folder (read permission required)'})
|
||||
path: string = 'demo/images';
|
||||
@ConfigProperty({description: 'Describe your system setup'})
|
||||
system: string = '';
|
||||
|
||||
|
||||
}
|
||||
|
||||
export const BMConfig = ConfigClassBuilder.attachInterface(new PrivateConfigClass());
|
||||
BMConfig.loadSync();
|
||||
Reference in New Issue
Block a user