9.0.0 • Published 10 months ago

@postdfm/plugin v9.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@postdfm/plugin

Sub-package for postdfm.

Provides structure and utilities for making plugins that can modify the structure provided by @postdfm/ast.

npm Continuous Integration Continuous Deployment Codecov branch

Table of Contents

Installation

# npm
$ npm install @postdfm/plugin

# yarn
$ yarn add @postdfm/plugin

Example Usage

import { Plugin } from "@postdfm/plugin";

class SomePlugin extends Plugin {
  install(hooks) {
    hooks.string.tap(ast => {
      // manipulate AST here
    }

    // all AST types can be manipulated, see AST.ASTTypes

    // also available:
    // - "after" hook for certain types
    hooks.after.object.tap(ast => {
      // manipulate AST here
    })
    // - "all" hook for everything - excludes "after" hooks
    hooks.all.tap(ast => {
      // manipulate AST here
    })
  }
}

Documentation

See postdfm for more information, or the generated typedoc documentation here.

Contributing

Bug reports and feature requests are greatly appreciated, as are pull requests.

Please see the Contributing Guide for instructions on how to contribute to this project.

License

Licensed under the MIT License.

9.0.0

10 months ago

8.0.3

2 years ago

7.0.7

2 years ago

8.0.1

2 years ago

8.0.0

2 years ago

8.0.2

2 years ago

7.0.6

3 years ago

7.0.5

3 years ago

7.0.4

3 years ago

7.0.3

3 years ago

7.0.2

3 years ago

7.0.1

3 years ago

7.0.0

3 years ago

6.0.3

3 years ago

6.0.1

3 years ago

6.0.2

3 years ago

6.0.0

3 years ago

6.0.0-beta.5

3 years ago

6.0.0-beta.4

3 years ago

6.0.0-beta.3

3 years ago

6.0.0-beta.2

3 years ago

6.0.0-beta.1

3 years ago