Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serverless-plugin-scripts

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-plugin-scripts

Add scripting capabilities to the Serverless Framework

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
41K
increased by2.66%
Maintainers
1
Weekly downloads
 
Created
Source

serverless-plugin-scripts npm version

Add scripting capabilities to the Serverless Framework.

Installation

Install the plugin in your Serverless (v1.0 or higher) project:

npm install --save serverless-plugin-scripts

And activate it by adding the following configuration to your serverless.yml file:

plugins:
  - serverless-plugin-scripts

Usage

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 compile

The 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

Keywords

FAQs

Package last updated on 10 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc