0.2.3 • Published 4 years ago

@xapp/serverless-plugin-type-definitions v0.2.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Deprecated

Do not use. Use @types/serverless instead.

serverless-plugin-type-definitions

Typescript definitions that can be used to make Serverless Plugins. Simply import this project and go.

This is so far incomplete and will be added upon as needed. PRs welcome.

Install

npm install --save-dev @xapp/serverless-plugin-type-definitions

Usage

In your Plugin file, simply import it like so:

MyPlugin.ts

import { Hooks, Serverless, ServerlessPlugin } from "@xapp/serverless-plugin-types"

class MyServerlessPlugin extends Plugin {

    private serverless: Serverless;
    hooks: Hooks;

    constructor(serverless: Serverless) {
        this.serverless = serverless;

        this.hooks = {
            "before:aws:deploy:deploy:createStack": this.doSomething.bind(this),
        }
    }

    doSomething() {
        this.serverless.cli.log("Hello from the plugin!");
    }
}
0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.23

4 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago