Closed WardCunningham closed 8 years ago
Rather than using the directory glob
to find plugins, I expect we will move to processing package.json
.
We will also need to do some rudimentary checking to ensure that there are not multiple versions of a component installed. For example, adding @wardcunningham/wiki-plugin-plugins
does not automatically remove wiki-plugin-plugins
, either in package.json
or as an installed package.
So, as well as running npm install @wardcunningham/wiki-plugin-plugins --save
you really also need to run npm uninstall wiki-plugin-plugins --save
to remove the original version of the plugin.
We would avoid the duplicate plugin problem by suggesting site operators simply edit the package.json file, I think.
The npm command-line install/save is looking less and less attractive.
The server would still need to be aware of scoped names, probably by the mechanism you suggest. This does make package.json a part of the server infrastructure which we never addressed in ruby.
Closing this - there was some discussion and even a pull request looking at this, see https://github.com/fedwiki/wiki/pull/59
If I install a scoped plugin with a command like this:
The plugin will be installed within a subdirectory of the node_modules named @wardcunningham/wiki-plugin-plugins. If this is to be supported, then we will have to extend the search inside the server to look inside scope folders.
We have a related but different problem with accessing the bin file when using scoped copies of wiki-node. Nick has a fix for this.