# build-lambdas

> easily build your lambdas

Latest version **0.0.12** (published 2020-02-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install build-lambdas
pnpm add build-lambdas
yarn add build-lambdas
bun add build-lambdas
```

Provides the command `build-lambdas`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.12 |
| Published | 2020-02-13 |
| First published | 2020-01-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 42.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ronald Luitwieler |
| Maintainers | robodo |
| Keywords | build lambdas |

## Links

- npm: https://www.npmjs.com/package/build-lambdas
- Repository: https://github.com/orangewise/build-lambdas
- Homepage: https://github.com/orangewise/build-lambdas#readme
- Issues: https://github.com/orangewise/build-lambdas/issues
- npm.io page: https://npm.io/package/build-lambdas

## Dependencies (7)

- [glob](https://npm.io/package/glob.md) ^7.1.6
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [yargs](https://npm.io/package/yargs.md) ^15.1.0
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.1
- [fixpack](https://npm.io/package/fixpack.md) ^2.3.1
- [archiver](https://npm.io/package/archiver.md) ^3.1.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0

## Recent versions

- 0.0.12 (latest) — 2020-02-13
- 0.0.11 — 2020-02-12
- 0.0.10 — 2020-02-07
- 0.0.9 — 2020-02-07
- 0.0.8 — 2020-02-07
- 0.0.7 — 2020-02-06
- 0.0.6 — 2020-02-06
- 0.0.4 — 2020-02-02
- 0.0.3 — 2020-02-01
- 0.0.1 — 2020-01-31

## README

# build-lambdas

[![Node.js CI][ci-badge]][ci-url]
[![npm version][npm-badge]][npm-url]

Utility to build your lambdas in parallel.

- runs `npm install --production` after removing `node_modules` folder
- runs `npm ci --only=production` if there is a package-lock.json
- it can zip your lambdas

## Usage

As a module:
```javascript
const path = require('path')
const join = path.join
const buildLambdas = require('build-lambdas')

const lambdaFolder01 = join('test', 'fixtures', 'lambdas', 'lambda-with-lock-01')
const lambdaFolder02 = join('test', 'fixtures', 'lambdas', 'lambda-with-lock-02')
const lambdaFolder03 = join('test', 'fixtures', 'lambdas', 'lambda-with-lock-03')
const lambdaFolderA = join('test', 'fixtures', 'lambdas', 'lambda-with-lock-a')

async function buildAndZip() {
  await buildLambdas.runParallel([
    { args: ['install', 'zip'], cwd: lambdaFolder01 },
    { args: ['install', ['run', 'build'], 'zip'], cwd: lambdaFolder02 },
    // you can also run your own function:
    { args: ['install', customZip], cwd: lambdaFolder03 }
  ])
}

// My own zip function:
async function customZip() {
  return buildLambdas.zipDirectory(lambdaFolderA, 'lambda-with-custom-zip-filename.zip')
}

buildAndZip()
```

## License

ISC


[npm-badge]: https://badge.fury.io/js/build-lambdas.svg
[npm-url]: https://badge.fury.io/js/build-lambdas

[ci-badge]: https://github.com/orangewise/build-lambdas/workflows/Node.js%20CI/badge.svg
[ci-url]: https://github.com/orangewise/build-lambdas/actions

---
_Source: https://npm.io/package/build-lambdas · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
