POSSIBLY BREAKING:
config/menu.hjson and config/prompt.hjson are now moved to misc/menu_template.in.hjson and config/prompt_template.in.hjson. These are now simply used as template files and copied to config/ with proper naming when issuing 'oputil.js config new'
This commit is contained in:
parent
f59b4b883f
commit
96d30af5d2
|
@ -138,8 +138,8 @@ function getDefaultConfig() {
|
||||||
closedSystem : false, // is the system closed to new users?
|
closedSystem : false, // is the system closed to new users?
|
||||||
loginAttempts : 3,
|
loginAttempts : 3,
|
||||||
|
|
||||||
menuFile : 'menu.hjson', // Override to use something else, e.g. demo.hjson. Can be a full path (defaults to ./config)
|
menuFile : 'menu.hjson', // 'oputil.js config new' will set this appropriately in config.hjson; may be full path
|
||||||
promptFile : 'prompt.hjson', // Override to use soemthing else, e.g. myprompt.hjson. Can be a full path (defaults to ./config)
|
promptFile : 'prompt.hjson', // 'oputil.js config new' will set this appropriately in config.hjson; may be full path
|
||||||
},
|
},
|
||||||
|
|
||||||
users : {
|
users : {
|
||||||
|
|
|
@ -263,14 +263,14 @@ function buildNewConfig() {
|
||||||
.toLowerCase();
|
.toLowerCase();
|
||||||
const menuFile = `${bn}-menu.hjson`;
|
const menuFile = `${bn}-menu.hjson`;
|
||||||
copyFileSyncSilent(
|
copyFileSyncSilent(
|
||||||
paths.join(__dirname, '../../config/menu.hjson'),
|
paths.join(__dirname, '../../misc/menu_template.in.hjson'),
|
||||||
paths.join(__dirname, '../../config/', menuFile),
|
paths.join(__dirname, '../../config/', menuFile),
|
||||||
fs.constants.COPYFILE_EXCL
|
fs.constants.COPYFILE_EXCL
|
||||||
);
|
);
|
||||||
|
|
||||||
const promptFile = `${bn}-prompt.hjson`;
|
const promptFile = `${bn}-prompt.hjson`;
|
||||||
copyFileSyncSilent(
|
copyFileSyncSilent(
|
||||||
paths.join(__dirname, '../../config/prompt.hjson'),
|
paths.join(__dirname, '../../misc/prompt_template.in.hjson'),
|
||||||
paths.join(__dirname, '../../config/', promptFile),
|
paths.join(__dirname, '../../config/', promptFile),
|
||||||
fs.constants.COPYFILE_EXCL
|
fs.constants.COPYFILE_EXCL
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue