nodebb-theme-harmony 2.2.70 → 2.2.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,8 @@
2
2
 
3
3
  const Controllers = module.exports;
4
4
 
5
- const accountHelpers = require.main.require('./src/controllers/accounts/helpers');
6
- const helpers = require.main.require('./src/controllers/helpers');
5
+ const accountHelpers = nodebb.require('./src/controllers/accounts/helpers');
6
+ const helpers = nodebb.require('./src/controllers/helpers');
7
7
 
8
8
  Controllers.renderAdminPage = (req, res) => {
9
9
  res.render('admin/plugins/harmony', {
package/library.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const nconf = require.main.require('nconf');
4
- const meta = require.main.require('./src/meta');
5
- const _ = require.main.require('lodash');
6
- const user = require.main.require('./src/user');
3
+ const nconf = nodebb.require('nconf');
4
+ const meta = nodebb.require('./src/meta');
5
+ const _ = nodebb.require('lodash');
6
+ const user = nodebb.require('./src/user');
7
7
 
8
8
  const controllers = require('./lib/controllers');
9
9
 
@@ -24,7 +24,7 @@ const defaults = {
24
24
 
25
25
  library.init = async function (params) {
26
26
  const { router, middleware } = params;
27
- const routeHelpers = require.main.require('./src/routes/helpers');
27
+ const routeHelpers = nodebb.require('./src/routes/helpers');
28
28
 
29
29
  routeHelpers.setupAdminPageRoute(router, '/admin/plugins/harmony', [], controllers.renderAdminPage);
30
30
 
@@ -42,13 +42,13 @@ library.init = async function (params) {
42
42
 
43
43
  async function buildSkins() {
44
44
  try {
45
- const plugins = require.main.require('./src/plugins');
45
+ const plugins = nodebb.require('./src/plugins');
46
46
  await plugins.prepareForBuild(['client side styles']);
47
47
  for (const skin of meta.css.supportedSkins) {
48
48
  // eslint-disable-next-line no-await-in-loop
49
49
  await meta.css.buildBundle(`client-${skin}`, true);
50
50
  }
51
- require.main.require('./src/meta/minifier').killAll();
51
+ nodebb.require('./src/meta/minifier').killAll();
52
52
  } catch (err) {
53
53
  console.error(err.stack);
54
54
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "2.2.70",
3
+ "version": "2.2.71",
4
4
  "nbbpm": {
5
- "compatibility": "^4.0.0"
5
+ "compatibility": "^4.12.0"
6
6
  },
7
7
  "description": "Harmony theme for NodeBB",
8
8
  "main": "library.js",
@@ -46,6 +46,6 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "eslint": "10.4.1",
49
- "eslint-config-nodebb": "^2.0.0"
49
+ "eslint-config-nodebb": "^2.0.2"
50
50
  }
51
51
  }
package/public/admin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  define('admin/plugins/harmony', ['settings'], function (Settings) {
4
- var ACP = {};
4
+ const ACP = {};
5
5
 
6
6
  ACP.init = function () {
7
7
  Settings.load('harmony', $('.harmony-settings'));