Skip to content

LeoPlatform/serverless-convention

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Dynamically import resources by defining a convention.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •