bloggify-plugin-class

2.1.3 • Public • Published

bloggify-plugin-class

Version Downloads

A library for managing plugin objects.

This module is used internally in plugin loaders.

☁️ Installation

# Using npm 
npm install --save bloggify-plugin-class
 
# Using yarn 
yarn add bloggify-plugin-class

📋 Example

var BloggifyPluginClass = require("bloggify-plugin-class");
 
// Create a new plugin
var myPlugin = new BloggifyPlugin("foo", "path/to/foo");
 
// And initialize it
myPlugin.init(function (err, data) {
    // Do something after initialization
    // ...
});

❓ Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. 🐛

📝 Documentation

BloggifyPlugin

Creates a new Bloggify plugin instance.

Params

  • String name: The plugin name.
  • String pluginPath: The plugin path.
  • Bloggify bloggifyInstance: The Bloggify instance.

Return

  • BloggifyPlugin The BloggifyPlugin instance containing:
  • name (String): The plugin's name.
  • path (String): The path to the plugin's directory.
  • packagePath (String): The path to the plugin's package.json file.
  • bloggify (Bloggify): The Bloggify instance.
  • config (Object): The plugin's configuration.

getFilePath(fileName)

Returns the path of the searched file.

Params

  • String fileName: The name of the file who's path is being searched.

Return

  • String The file's path.

init(cb)

Initializes the plugin.

Params

  • Function cb: The callback function.

getConfig()

Returns plugin's configuration.

Return

  • Object The configuration content.

getPackage(cb)

Returns the plugin's package file.

Params

  • Function cb: The callback function.

Return

  • Object The package contents.

😋 How to contribute

Have an idea? Found a bug? See how to contribute.

💫 Where is this library used?

If you are using this library in one of your projects, add it in this list. ✨

  • bloggify-plugin-loader

📜 License

MIT © Bloggify

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.1.3
    2
    • latest

Version History

Package Sidebar

Install

npm i bloggify-plugin-class

Weekly Downloads

2

Version

2.1.3

License

MIT

Unpacked Size

15.1 kB

Total Files

4

Last publish

Collaborators

  • ionicabizau