Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a config file to enable/disable various features #511

Open
not-an-aardvark opened this issue Jan 12, 2016 · 7 comments
Open

Add a config file to enable/disable various features #511

not-an-aardvark opened this issue Jan 12, 2016 · 7 comments

Comments

@not-an-aardvark
Copy link
Contributor

This should make it easier to toggle optional features, and to change specific rules (e.g. whether or not to archive modmails, whether to count a specific trade type for flair, etc.), or without having to change a bunch of code. The config file should be on gitignore, with a second "default" config file included in the repo.

This will require cleaning up the code to make features easily toggleable, which is probably a good idea anyway.

@not-an-aardvark
Copy link
Contributor Author

@AlMcKinlay
Copy link
Contributor

What's wrong with using the existing config file?

@not-an-aardvark
Copy link
Contributor Author

local.js? That also works.

I suppose it would be good if there was default config file that was part of the repo, and specific options could optionally be overridden in local.js.

@AlMcKinlay
Copy link
Contributor

There actually is. The local.example.js is actually included

On Tue, 12 Jan 2016, 07:33 not-an-aardvark [email protected] wrote:

local.js? That also works.

I suppose it would be good if there was default config file that was part
of the repo, and specific options could optionally be overridden in
local.js.


Reply to this email directly or view it on GitHub
#511 (comment)
.

@not-an-aardvark
Copy link
Contributor Author

Right, but I mean a separate default that actually gets used. So we would have the default config in a separate file, as:

module.exports = {
  option1: true,
  option2: true,
  option3: true
};

Then in local.js, one could override the default parameters like this:

module.exports = {
  /* ... (password stuff, etc.) ... */
  config: {
    option2: false // Override the default value of option2, but use the default values for option1 and option3
  }
};

@AlMcKinlay
Copy link
Contributor

The local.example.js actually does get used.

On Tue, 12 Jan 2016, 07:45 not-an-aardvark [email protected] wrote:

Right, but I mean a separate default that actually gets used. So we would
have a default config in a separate file, as:

module.exports = {
option1: true,
option2: true,
option3: true
};

Then in local.js, one could override the default parameters like this:

module.exports = {
/* ... (password stuff, etc.) ... */
config: {
option2: false // Override the default value of option2, but use the default values for option1 and option3
}
};


Reply to this email directly or view it on GitHub
#511 (comment)
.

@not-an-aardvark
Copy link
Contributor Author

Oh, so it does. Never mind, then.

@AlMcKinlay AlMcKinlay removed the next label Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants