Skip to content

Relative path for plugins #3

@pihomeserver

Description

@pihomeserver

Hello,

I use your package to develop a server based on NodeJS. My server has been installed using the Angular Fullstack generator (a client folder, a server folder and a dedicated one for npm modules)

So i installed your manager using npm but i can't load plugins defined in the server folder because the require function expects a path from the node_modules/polite-plugin-manager/src folder and registerMany a path from the working directory of the server (where node is executed)
I have to append ../../../ in front of my path in the registerPackage :

module.exports.registerPackage = function (sourceFolder, context) {
    sourceFolder = '../../../'+sourceFolder;
    var name = path.basename(sourceFolder),
        module = require(sourceFolder),
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions