@dawnjs/dn-middleware-call

1.1.3 • Public • Published

@dawnjs/dn-middleware-call

npm npm

Usage

demo1:
  - name: '@dawnjs/dn-middleware-shell'
    script:
      - echo demo1

demo2:
  - name: '@dawnjs/dn-middleware-shell'
    script:
      - echo demo2

demo3:
  - name: '@dawnjs/dn-middleware-shell'
    script:
      - echo demo3

demo:
  - name: '@dawnjs/dn-middleware-call'
    pipe:
      - demo3
    when:
      'process.env.NODE_ENV !== "production"': demo1
      'process.env.NODE_ENV === "production"': demo2

Options

Name Type Description
pipe string | string[] The pipeline name[s] which needs to be called always in order
when object The pipeline name which needs to be called if meet the conditions after pipe array

Condition expression description

  • Condition expression can be any valid statement that return boolean value.
  • Middleware will extract all field in context to the condition expression scope with with statement.

Readme

Keywords

Package Sidebar

Install

npm i @dawnjs/dn-middleware-call

Homepage

dawnjs.com

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

9.57 kB

Total Files

7

Last publish

Collaborators

  • djknight
  • jeason
  • soulwu
  • ssbabysong