os-js / osjs-cli

OS.js CLI Module

Home Page:https://manual.os-js.org/v3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for configuration via CLI

andersevenrud opened this issue · comments

In v2, configuration was all stored as JSON files, which made it very easy to manipulate.

Now, in v3 all configurations comes by default as .js files.

They use regular exports, so it should be easy to make a script that makes changes to these files as well -- though this might require some heavy dependencies.

I see that maybe adding JSON file support as an alternative and have the CLI files write to these. Example src/conf/client.json which is prioritized lower than the .js file(s).

A big reason why this is useful is because of deployment and automated installers.

Thanks to @aherreraGH for bringing this up.

I've done some work on this mr. @aherreraGH

https://github.com/os-js/osjs-json-config-cli

It should be usable, but I have some other features I'd like to put in there 😄

This is now pretty much done, at least from the osjs-cli side of things. All remaining work will go into the library I use for this plugin: https://github.com/andersevenrud/simplejsonconf

The repos involved now has full documentation and I've added some notes about this in the OS.js manual as well.

Closing this for now :)