A library for managing plugin objects.
This module is used internally in plugin loaders.
# Using npm
npm install --save bloggify-plugin-class
# Using yarn
yarn add bloggify-plugin-classvar 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
// ...
});There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues. 🐛
Creates a new Bloggify plugin instance.
- String
name: The plugin name. - String
pluginPath: The plugin path. - Bloggify
bloggifyInstance: The Bloggify instance.
- BloggifyPlugin The
BloggifyPlugininstance containing: name(String): The plugin's name.path(String): The path to the plugin's directory.packagePath(String): The path to the plugin'spackage.jsonfile.bloggify(Bloggify): TheBloggifyinstance.config(Object): The plugin's configuration.
Returns the path of the searched file.
- String
fileName: The name of the file who's path is being searched.
- String The file's path.
Initializes the plugin.
- Function
cb: The callback function.
Returns plugin's configuration.
- Object The configuration content.
Returns the plugin's package file.
- Function
cb: The callback function.
- Object The package contents.
Have an idea? Found a bug? See how to contribute.
If you are using this library in one of your projects, add it in this list. ✨
bloggify-plugin-loader