JSPM

serverless-run-watch

0.4.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 247
  • Score
    100M100P100Q85146F
  • License MIT

Cloud-local developer experience for Serverless. Single-digit second deploys, and logs streamed from CloudWatch straight to your terminal

Package Exports

  • serverless-run-watch
  • serverless-run-watch/ServerlessRunWatch.js

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-run-watch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Serverless Run Watch

serverless

This Serverless plugin provides a fast iterate -> test loop in your CLI.

Logs delivered from CloudWatch to your terminal.

Deployments skip CloudFormation, and use direct updateFunction and updateFunctionConfiguration API calls which take only a few seconds.

Supports all runtimes

sls-run-watch-reduced

Documentation

Installation

serverless plugin install -n serverless-run-watch

then run

serverless run-watch --function <yourFunctionName>

Command Line Options

function (required)

Specify the name of the function to deploy and tail logs.

disable-logs

Skip streaming logs, only redeploy your function when a change is detected

config

This is shared with serverless, and honors a config file named something other than serverless.yml.

stage

This is shared with serverless

region

This is shared with serverless

watch-glob

Customize the path or paths (comma-separated) to watch. Supports glob/regex, or a direct file. Useful if you have a large project but only want to redeploy if one (or a few) files change. Also useful if my regex is missing a file you use.

Usage

sls run-watch --function <your function name>

This plugin grew from a hacky script which combines two commands built into the framework: serverless logs and serverless deploy function, along with chokidar, a library based on fs events.

It is useful only when changing function code, or function configuration changes like architecture, timeout, memory, or environment variables. Other changes (adding new functions, adding IAM permissions, new events, or provisioning additional resources) requires a full CloudFormation deployment.

Serverless Framework Support

Initially tested with v3. Likely supports other versions, but the CLI might not look as nice.

License

MIT

Contributing

Feel free to raise a PR