Package Exports
- serverless-plugin-scripts
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 (serverless-plugin-scripts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
serverless-plugin-scripts 
Add scripting capabilities to the Serverless Framework.
Installation
Install the plugin in your Serverless (v1.0 or higher) project:
npm install --save serverless-plugin-scriptsAnd activate it by adding the following configuration to your serverless.yml file:
plugins:
- serverless-plugin-scriptsUsage
Custom commands
To add a custom command to the Serverless CLI, just define a custom.scripts.commands property in your serverless.yml file:
custom:
scripts:
commands:
hello: echo Hello from ${self:service} service!You can now run serverless hello to execute the hello command.
Simple hooks
It is possible to define simple hooks for existing Serverless CLI commands by adding a custom.scripts.hooks property in your serverless.yml file:
custom:
scripts:
hooks:
'deploy:createDeploymentArtifacts': npm run compileThe next time you run serverless deploy, your script will be automatically invoked during the deploy:createDeploymentArtifacts lifecycle event.
To find out all existing lifecycle events, check out the Serverless Framework documentation.
Author
Created and maintained by Manuel Vila.
License
MIT