pown-modules
v0.4.4
Published
Pownage guaranteed
Downloads
5
Readme
pown-modules
Utility library for working with Pown.js modules.
Quickstart
From the same directory as your project's package.json, install this module with the following command:
$ npm install pown-modules --save
Once that's done, you can list all installed pown modules like this:
const pownModules = require('pown-modules')
pownModules.list((err, modules) => {
if (err) {
console.error(err)
return
}
modules.forEach((module) => {
// do something with module.config, module.package or module.realpath
})
})
Pown Modules
A pown module is a regular NPM module which exports pown features and options via package.json or .pownrc.
Example: package.json
{
"pown": {
"main": "./main.js",
"command": "./mytool.js",
"commands": [
"./mytool2.js"
],
"plugin": "./myplugin.js",
"plugins": [
"./myplugin2.js"
]
}
}
Example: .pownrc
{
"main": "./main.js",
"command": "./mytool.js",
"commands": [
"./mytool2.js"
],
"plugin": "./myplugin.js",
"plugins": [
"./myplugin2.js"
]
}