Socket
Socket
Sign inDemoInstall

docpad-plugin-pluginmanager

Package Overview
Dependencies
101
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    docpad-plugin-pluginmanager

Manages the plugins in a Docpad application


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
39.2 kB
Created
Weekly downloads
 

Readme

Source

Plugin Manager Plugin for DocPad

Build Status NPM version NPM downloads

Docpad plugin that enables the viewing and managing of plugins from within a docpad website. It's designed to function as part of a admin/CMS interface.

Screen shot

At the moment it adds the list of installed plugins to the docpad templateData which makes this data available to application templates. It also adds a description field to each plugin, pulled from the package.json file for each plugin and makes available data URLs to retrieve a plugin's readme file or package.json.

Default configuration

        config:
            readmeURL: '/admin/plugins/:pluginName/readme'
            packageURL: '/admin/plugins/:pluginName/package'

Example template (eco)

Eco template that generates a table listing the plugins used in an application.

<table width="100%">
  <thead>
    <tr>
      <th>Name</th>
      <th width="60%">Description</th>
      <th>Version</th>
      <th>Enabled</th>
    </tr>
  </thead>
  <tbody>
    <%plugins = @loadedPlugins%>
    <%for name,plugin of plugins:%>
    <%rowClass = if plugin.isEnabled() then "" else "disabled"%>
    <tr class="<%-rowClass%>" data-name="<%-name%>">  
      <td><a data-id="<%-name%>" class="readme-btn" href="/admin/readme/"><%-name%></a></td>
      <td><%-plugin.description%></td>
      <td><%-plugin.version%></td>
      <td><%-plugin.isEnabled()%></td>
    </tr>
    <%end%>
  </tbody>
</table>

License

Licensed under the incredibly permissive MIT license

Copyright © 2016+ Steve McArthur steve@stevemcarthur.co.uk (http://www.stevemcarthur.co.uk)

Keywords

FAQs

Last updated on 27 May 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc