0.3.0 • Published 9 years ago

dmp-plugin-loader v0.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

Documark Plugin Loader

npm version dependency status

Documark plugin for loading plugins with ease!

Usage

  1. Load plugin loader:

    plugins:
      - dmp-plugin-loader
  2. Specify plugins in your document.jade:

    ---
    title: Document
    ---
    
    plugin my-plugin
  3. The plugin loader will then find all plugin elements and use their text as plugin name.

  4. If the file or folder ./plugins/my-plugin exists (relative to your document root), it will be loaded as a Node module (require('/path/to/plugins/my-plugin');). Else the plugin name will be loaded (require('my-plugin');).

    See Node modules, LOAD_AS_FILE and LOAD_AS_DIRECTORY for more information.