How to specify dependency on other plugins?

  • Hi folks, I'm developing some custom plugins for NodeBB and one is dependent on the other being installed. How would I specify this kind of dependency? I know that dependencies on npm is specified as usual in package.json, but would what work in my case, since I want the forum to have the nodebb plugin installed?

    What I mean is, I'm doing module.parent.require and not just require. Would package.json/dependencies still work with that, or is there another better way?

    Best regards, I find NodeBB to be really awesome.

  • Global Moderator Plugin & Theme Dev

    There's no way to require it. The best you can do is tell the user to do it.

    Also, it use require.main.require instead

Suggested Topics

  • 5
  • 8
  • 2
  • 20
  • 3
| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.