0.0.1-develop • Published 7 years ago

@kennship/gulp-lambda v0.0.1-develop

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

@kennship/gulp-lambda

Bundle AWS Lambda functions from Gulp.

Usage

// gulpfile.js
const gulp = require('gulp');
const registerLambdaBundler = require('@kennship/gulp-lambda');

registerLambdaBundler(gulp, 'path/to/mypkg', {
  dest: 'dist',
});

Done. This creates two Gulp tasks:

# Run `npm install` for your lambda
gulp lambda.npm-install

# Generate the ZIP file for your lambda and output to `dist/mypkg.zip`.
# Runs `npm install` first.
gulp lambda.bundle

Using with Gulp v4

// gulpfile.js
const gulp = require('gulp');
const registerLambdaBundler = require('@kennship/gulp-lambda/gulpv4');

registerLambdaBundler(gulp, 'path/to/mypkg', {
  dest: 'dist',
});

Because of the way Gulp 4 works, this will create three tasks:

# Run `npm install` for your lambda
gulp lambda.npm-install

# Generate the ZIP file for your lambda and output to `dist/mypkg.zip`
gulp lambda.bundle

# Run `npm install` and then generate the ZIP.
gulp lambda

License

MIT