serverless-convention

2.0.2 • Public • Published

serverless-convention

Define your convention in the serverless yml and dynamically include resources.

Example:

custom:
  convention:
    functions:
      folders:
        - api
        - bots
      pattern:
        - '*.yml'
    resources:
      folders:
        - cloudformation
      pattern:
        - '*.yml'
        - '*.js'
        - '*.json'
  included: ${file(./node_modules/serverless-convention/index.js)}
functions:
  - ${self:custom.included.functions}
resources:
  - ${self:custom.included.resources}

All yml files in the api and bots folders will be included as functions in the cloudformation. All yml, js, and json files found in the cloudformation folder will also be included.

Optionally, convention objects can be specified with an "asFileArray" flag which will result in an array of relative file references to the files found.

Dependents (0)

Package Sidebar

Install

npm i serverless-convention

Weekly Downloads

404

Version

2.0.2

License

MIT

Unpacked Size

7.98 kB

Total Files

6

Last publish

Collaborators

  • leoinsights
  • jgrantr
  • czirker
  • elsmob
  • jhunsaker
  • jtmckay