Serverless script for setting up file structure conventions
npm install serverless-convention
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}
``Optionally, convention objects can be specified with an "asFileArray" flag which will result in an array of relative file references to the files found.