From 96d30af5d2cf0480f798adaf201467a8b18dbb4a Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 13 Nov 2018 21:32:22 -0700 Subject: [PATCH] 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' --- core/config.js | 4 ++-- core/oputil/oputil_config.js | 4 ++-- config/menu.hjson => misc/menu_template.in.hjson | 0 config/prompt.hjson => misc/prompt_template.in.hjson | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename config/menu.hjson => misc/menu_template.in.hjson (100%) rename config/prompt.hjson => misc/prompt_template.in.hjson (100%) diff --git a/core/config.js b/core/config.js index c1fffc45..97091be5 100644 --- a/core/config.js +++ b/core/config.js @@ -138,8 +138,8 @@ function getDefaultConfig() { closedSystem : false, // is the system closed to new users? loginAttempts : 3, - menuFile : 'menu.hjson', // Override to use something else, e.g. demo.hjson. Can be a full path (defaults to ./config) - promptFile : 'prompt.hjson', // Override to use soemthing else, e.g. myprompt.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', // 'oputil.js config new' will set this appropriately in config.hjson; may be full path }, users : { diff --git a/core/oputil/oputil_config.js b/core/oputil/oputil_config.js index 40644dee..83ac5232 100644 --- a/core/oputil/oputil_config.js +++ b/core/oputil/oputil_config.js @@ -263,14 +263,14 @@ function buildNewConfig() { .toLowerCase(); const menuFile = `${bn}-menu.hjson`; copyFileSyncSilent( - paths.join(__dirname, '../../config/menu.hjson'), + paths.join(__dirname, '../../misc/menu_template.in.hjson'), paths.join(__dirname, '../../config/', menuFile), fs.constants.COPYFILE_EXCL ); const promptFile = `${bn}-prompt.hjson`; copyFileSyncSilent( - paths.join(__dirname, '../../config/prompt.hjson'), + paths.join(__dirname, '../../misc/prompt_template.in.hjson'), paths.join(__dirname, '../../config/', promptFile), fs.constants.COPYFILE_EXCL ) diff --git a/config/menu.hjson b/misc/menu_template.in.hjson similarity index 100% rename from config/menu.hjson rename to misc/menu_template.in.hjson diff --git a/config/prompt.hjson b/misc/prompt_template.in.hjson similarity index 100% rename from config/prompt.hjson rename to misc/prompt_template.in.hjson