Skip to content

Commit

Permalink
config(wiki): split locations to dedicated file
Browse files Browse the repository at this point in the history
  • Loading branch information
ChlodAlejandro committed May 28, 2024
1 parent d7d95d1 commit fda9b30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/config/WikiConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ import {
batchListingPageWikitext,
batchListingWikitext,
collapseBottom,
collapseTop, copyvioBottom, copyvioTop,
collapseTop,
copyvioBottom,
copyvioTop,
listingWikitext
} from '../wiki/TemplatePolyfills';
import ConfigurationReloadBanner from '../ui/config/ConfigurationReloadBanner';
import WikiConfigurationLocations from './WikiConfigurationLocations';
import changeTag from './changeTag';
import applyOverrides from '../util/applyOverrides';
import log from '../util/log';
Expand Down Expand Up @@ -45,12 +48,7 @@ export default class WikiConfiguration extends ConfigurationBase {

static readonly configVersion = 2;
static readonly optionKey = 'userjs-deputy-wiki';
static readonly configLocations = [
'MediaWiki:Deputy-config.json',
// Prioritize interface protected page over Project namespace
'User:Chlod/Scripts/Deputy/configuration.json',
'Project:Deputy/configuration.json'
];
static readonly configLocations = WikiConfigurationLocations;

/**
* Loads the configuration from a set of possible sources.
Expand Down
6 changes: 6 additions & 0 deletions src/config/WikiConfigurationLocations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default [
'MediaWiki:Deputy-config.json',
// Prioritize interface protected page over Project namespace
'User:Chlod/Scripts/Deputy/configuration.json',
'Project:Deputy/configuration.json'
];

0 comments on commit fda9b30

Please sign in to comment.