fixings

1.2.0 • Public • Published

Fixings

the 'g' is silent

1.2.0

pipeline status coverage report

Add a plugin system to your project with ease.

Install

npm install --save fixings

const fixings = require('fixings')
 
// Create a new plugin manager
var Plate = new Fixings()
 
// Add some plugins
Plate.addPlugin({
  name: 'my-plugin',
  'hook': function(...) {
    // do stuff when called upon
  }
})
Plate.addPlugin(require('some-plugin'))
 
// Create a consumer for a specific hook
var Eater = Plate.resolveHook('hook')
 
// Loop through the plugins and run them
do {
  var plugin = Eater.next()
  if (plugin !== null)
    plugin.handler(...)
} while (plugin)

For full documentation and tutorials (soon)(tm) see https://drew-s.gitlab.io/fixings

/fixings/

    Package Sidebar

    Install

    npm i fixings

    Weekly Downloads

    0

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    67.5 kB

    Total Files

    24

    Last publish

    Collaborators

    • drew-s