@pown/modules
Pownage guaranteed
Last updated 4 months ago by pdparchitect .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @pown/modules 
SYNC missed versions from official npm registry.

Follow on Twitter NPM Fury

Pown Modules

Utility library for working with Pown.js modules.

Quickstart

Install this module from the root of your project:

$ npm install @pown/modules --save

Once done, 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
    })
})

You can also use promises with async/await like this:

const pownModules = require('@pown/modules')

const modules = await pownModules.list()

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"
    ]
}

Current Tags

  • 2.3.0                                ...           latest (4 months ago)

8 Versions

  • 2.3.0                                ...           4 months ago
  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 0.5.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 3
Last Day 1
Last Week 0
Last Month 8
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |