Detalhes do pacote

docpad-baseplugin

docpad178MIT1.4.0

BasePlugin class for DocPad

docpad, esnext, node, plugin

readme (leia-me)

docpad-baseplugin

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

BasePlugin class for DocPad

Usage

Complete API Documentation.

Install the dependency like so:

npm install --save docpad-baseplugin

Create your plugins using CoffeeScript like so:

module.exports = class MyPlugin extends require('docpad-baseplugin') {
    name: 'myplugin'
    initialConfig: {}
    # ...
}

Create your plugins using JavaScript like so:

module.exports = class MyPlugin extends require('docpad-baseplugin') {
    get name() {
        return 'myplugin'
    }
    get initialConfig() {
        return {}
    }
    // ...
}

You can use boundation to scaffold the above.

To setup tests, see docpad-plugintester.

Install

npm

  • Install: npm install --save docpad-baseplugin
  • Import: import * as pkg from ('docpad-baseplugin')
  • Require: const pkg = require('docpad-baseplugin')

Editions

This package is published with the following editions:

  • docpad-baseplugin aliases docpad-baseplugin/source/index.js
  • docpad-baseplugin/source/index.js is ESNext source code for Node.js 10 || 12 || 13 || 14 with Require for modules

TypeScript

This project provides its type information via inline JSDoc Comments. To make use of this in TypeScript, set your maxNodeModuleJsDepth compiler option to 5 or thereabouts. You can accomlish this via your tsconfig.json file like so:

{
  "compilerOptions": {
    "maxNodeModuleJsDepth": 5
  }
}

History

Discover the release history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

License

Unless stated otherwise all works are:

and licensed under:

changelog (log de mudanças)

History

v1.4.0 2020 August 5

  • Updated dependencies, base files, and editions using boundation
  • Minimum required node version changed from node: >=0.10 to node: >=10 to keep up with mandatory ecosystem changes

v1.3.0 2020 August 5

v1.2.0 2020 August 5

v1.1.0 2020 August 5

v1.0.3 2018 September 7

  • Remove setInstanceConfig and make use of DocPad 6.82.0's new mergeConfigs method

v1.0.2 2018 September 3

v1.0.1 2018 August 20

  • Add isDocPadPlugin static method, to make it easier for DocPad to detect plugins
  • Support getters for name and priority
  • Internal changes
    • No need for dereferencing config when initialConfig already contains it config
    • No need for dereferencing instanceConfig as it shouldn't be set yet

v1.0.0 2018 August 20

  • Abstracted out from DocPad v6.80.9 and converted to esnext