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/misc/config_template.in.hjson b/misc/config_template.in.hjson index 296e7826..3acb0823 100644 --- a/misc/config_template.in.hjson +++ b/misc/config_template.in.hjson @@ -44,7 +44,7 @@ BBS : Xibalba @ xibalba.l33t.codes FTN : BBS Discussion on fsxNet IRC : #enigma-bbs / FreeNode - Email : bryan@leet.codes + Email : bryan@l33t.codes */ general: { diff --git a/config/menu.hjson b/misc/menu_template.in.hjson similarity index 97% rename from config/menu.hjson rename to misc/menu_template.in.hjson index 1c48ef63..8f1aca3b 100644 --- a/config/menu.hjson +++ b/misc/menu_template.in.hjson @@ -10,20 +10,43 @@ /__ _\ <*> ENiGMA½ // HTTPS://GITHUB.COM/NUSKOOLER/ENIGMA-BBS <*> /__/ - ------------------------------------------------------------------------------- + *-----------------------------------------------------------------------------* - This configuration is in HJSON (http://hjson.org/) format. Strict to-spec - JSON is also perfectly valid. Use 'hjson' from npm to convert to/from JSON. - - See http://hjson.org/ for more information and syntax. + General Information + ------------------------------- - - + This configuration is in HJSON (http://hjson.org/) format. Strict to-spec + JSON is also perfectly valid. Use 'hjson' from npm to convert to/from JSON. + See http://hjson.org/ for more information and syntax. - If you haven't yet, copy the conents of this file to something like - sick_board.hjson. Point to it via config.hjson using the - 'general.menuFile' key: - - general: { menuFile: "sick_board.hjson" } - + Various editors and IDEs such as Sublime Text 3, Visual Studio Code, and so + on have syntax highlighting for the HJSON format which are highly recommended. + + ------------------------------- -- - - + Menu Configuration + ------------------------------- - - + ENiGMA½ makes no assumptions about specific menu types (main, doors, etc.), + but instead allows full customization of all menus throughout the system. + Some menus such as a main menu are considered "standard" while others are + backed by a specific module. SysOps can tweak various settings about these + modules (look & feel, keyboard interation, and so on) or even fully replace + the module with something else. + + This file starts out as an example setup. Look at the examples, change + settings, menu ordering/flow, add/remove menus, implement ACS control, + etc.! + + Remember you can *live edit* this file. That is, make a change and save + while you're logged into the system and it will take effect on the next + menu change or screen refresh. + + Please see RTFM ...er, uh... see the documentation for more information, and + don't be shy to ask for help: + + BBS : Xibalba @ xibalba.l33t.codes + FTN : BBS Discussion on fsxNet + IRC : #enigma-bbs / FreeNode + Email : bryan@l33t.codes */ menus: { // 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