• Stars
    star
    123
  • Rank 290,145 (Top 6 %)
  • Language
    JavaScript
  • Created almost 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Add scripting capabilities to the Serverless Framework

serverless-plugin-scripts npm version

Add scripting capabilities to the Serverless Framework.

Caution

This project is in maintenance mode, and it will not get any new features.

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 about existing lifecycle events, check out this page.

Author

Created and maintained by Manuel Vila.

License

MIT

More Repositories

1

npm-addict

[TERMINATED] Your daily injection of npm packages
JavaScript
35
star
2

reserved-usernames

List of reserved usernames to prevent URL collision with resource paths
JavaScript
31
star
3

radium-starter

The minimum viable layer on top of HTML/CSS (using React and Radium)
JavaScript
22
star
4

on-save

Run a shell command when you save a file in Atom
JavaScript
20
star
5

co-retry

Automatically retry generators that fail
JavaScript
13
star
6

radium-normalize

Normalize.css for Radium
JavaScript
11
star
7

co-limiter

Limits how many generators can be ran at the same time
JavaScript
10
star
8

payment-card-magnetic-stripe-parser

Parse payment card magnetic stripe data
JavaScript
9
star
9

validate-email-hostname

Check if the hostname of an email has a MX or A record
JavaScript
6
star
10

event-emitter-mixin

Event emitter mixin using ES7 decorators
JavaScript
5
star
11

dnpm

Like npm but fetches packages from a local directory rather than from the registry
JavaScript
5
star
12

set-immediate-promise

Return a promise immediately resolved by setImmediate()
JavaScript
3
star
13

realworld-website

The source code of the RealWorld website
TypeScript
3
star
14

better-node-env

NODE_ENV || 'development' for Node and browser
JavaScript
3
star
15

ec2-backup

Easy backup your EC2 instances
CoffeeScript
3
star
16

co-priority-queue

A simple priority queue for co
JavaScript
2
star
17

universal-log

Flexible logger for Node.js and the browser
JavaScript
2
star
18

mongodb-to-s3

TypeScript
1
star
19

easy-notifier

Flexible notifier with desktop and Slack targets
JavaScript
1
star
20

popular-passwords

List of popular passwords with at least 8 characters
JavaScript
1
star
21

big-companies

List of the biggest companies in the world
JavaScript
1
star
22

easy-json-rpc

Easily build and handle JSON-RPC 2.0 requests, notifications and responses
JavaScript
1
star
23

promise-with-timeout

Limit the time to resolve a promise
JavaScript
1
star
24

json-web-storage

Simple localStorage/sessionStorage wrapper providing the exact same API with automatic JSON serialization
JavaScript
1
star
25

eslint-config-next

ESLint configuration using Babel parser to support next JS cutting edge features
JavaScript
1
star