Skip to content

Commit

Permalink
chore: export JavaScript for extensions to extend (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspervriends authored Aug 7, 2022
1 parent 358b9c0 commit 5b85c5a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
* file that was distributed with this source code.
*/

export * from './src/common';
export * from './src/admin';
1 change: 1 addition & 0 deletions js/forum.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
* file that was distributed with this source code.
*/

export * from './src/common';
export * from './src/forum';
2 changes: 2 additions & 0 deletions js/src/common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as Themes } from './Themes';
export * as setSelectedTheme from './setSelectedTheme';
4 changes: 4 additions & 0 deletions js/src/forum/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import app from 'flarum/forum/app';
import addSettingsItems from './addSettingsItems';
import setSelectedTheme from '../common/setSelectedTheme';

export * as perDeviceSetting from './helpers/perDeviceSetting';
export * as switchTheme from './helpers/switchTheme';
export { default as getTheme } from './getTheme';

app.initializers.add('fof-nightmode', () => {
addSettingsItems();
setSelectedTheme();
Expand Down

0 comments on commit 5b85c5a

Please sign in to comment.