JSPM

webhook-config-manager

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q26903F
  • License MIT

Loads content of found javascript and json files in given directory into a single structured object

Package Exports

  • webhook-config-manager

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webhook-config-manager) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

webhook-config-manager

Consolidates all webhook configs found in given directory in a single new one.

Version tests

Looks for all hook.json found in <cwd>/**/*. Loads the content of all of them, concatenate them in on single array and writes the output in a file <cwd>/web-hooks.json.

Example

Take the following file structure:

my-projects/
├── project-a/
│   ├── hook.json
│   ├── index.js
│   └── package.json
├── project-b/
│   ├── hook.json
│   ├── index.js
│   └── package.json
└── project-c/
    ├── hook.json
    ├── index.js
    └── package.json

project-a/hooks.json

[
  {
    "name": "project a"
  }
]

<cwd>/project-b/hooks.js

[
  {
    "name": "project b"
  }
]

<cwd>/project-c/hooks.js

[
  {
    "name": "project c"
  }
]

...and the following script:

$ npx webhook-config-manager

<cwd>/web-hooks.json

[
  {
    "name": "project a"
  },
  {
    "name": "project b"
  },
  {
    "name": "project c"
  }
]

License

MIT

© 2020-present Martin Rafael Gonzalez tin@devtin.io