@auto-canary/exec
TypeScript icon, indicating that this package has built-in type declarations

9.18.0-canary.1033.13623.0 • Public • Published

Exec Plugin

Tap into hooks and run commands on the terminal.

Main hooks, in call order:

  • beforeRun
  • getRepository
  • getAuthor
  • beforeShipIt
  • getPreviousVersion
  • afterAddToChangelog
  • beforeCommitChangelog
  • version
  • afterVersion
  • publish
  • afterPublish
  • afterRelease
  • afterShipIt

Other hooks:

  • canary
  • next
  • modifyConfig
  • makeRelease
  • onCreateLogParse
    • parseCommit
    • omitCommit
  • onCreateChangelog
    • renderChangelogLine
    • renderChangelogTitle
    • renderChangelogAuthor
    • renderChangelogAuthorLine
    • omitReleaseNotes
  • onCreateRelease
    • createChangelogTitle

Installation

This plugin is not included with the auto CLI installed via NPM. To install:

npm i --save-dev @auto-it/exec
# or
yarn add -D @auto-it/exec

Usage

Here is an example of replacing the npm plugins with a light-weight version.

All args to a hook are exposed on the process in environment variables. The format looks like $ARG_0, $ARG_1, and so on. Please look at the docs for writing plugins for more detail on what's available.

{
  "plugins": [
    [
      "exec",
      {
        "version": "npm version $ARG_0",
        "publish": "npm publish && git push --tags",
        "afterRelease": "yarn docs && push-dir --dir=docs --branch=gh-pages"
      }
    ]
    // other plugins
  ]
}

::: message is-warning ⚠️ If you are tapping into a waterfall or bail hook you will need to return some value (ex: JSON or a boolean). Please refer to the documentation and return the right thing! :::

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @auto-canary/exec

    Weekly Downloads

    19

    Version

    9.18.0-canary.1033.13623.0

    License

    MIT

    Unpacked Size

    16.6 kB

    Total Files

    7

    Last publish

    Collaborators

    • alisowski
    • hipstersmoothie-canary