yarn-plugin-hooker

1.0.0 • Public • Published

yarn-plugin-hooker

The plugin adds support for pre- and post-hooks for scripts in your package.json

Installation

yarn dlx yarn-plugin-hooker

Usage

If you want to add a command that runs automatically before, for example, the test command, create a command with the pre prefix (pretest)

You can do the same for the post-execution action by adding a post prefix to the beginning (posttest)

{
    "name": "example",
    "scripts": {
        "pretest": "node -e \"console.log('pretest command')\"",
        "test": "jest",
        "posttest": "node -e \"console.log('posttest command')\""
    }
}

Package Sidebar

Install

npm i yarn-plugin-hooker

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.99 kB

Total Files

5

Last publish

Collaborators

  • vordgi