build-lambda-layer
Advanced tools
Comparing version 0.2.11 to 0.3.0
{ | ||
"name": "build-lambda-layer", | ||
"version": "0.2.11", | ||
"version": "0.3.0", | ||
"description": "Build node awesome lambda layers with controls 🕹", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -16,37 +16,93 @@ # Build Lambda Layer | ||
_Build Lambda Layer_ is built to take any consideration out of the _seemingly_ simple task of building a lambda layer.<br> | ||
Sure, you could do it manually but why when _Build Lambda Layer_ will get it done it for you! | ||
_Build Lambda Layer_ takes all complexity out of building lambda layers. | ||
--- | ||
By running: | ||
### Do I get any other benefits? | ||
```sh | ||
build-layer my-lambda-layer | ||
``` | ||
Yes! _Build Lambda Layer_ is built to assist with optimizing your node lambda layer builds, it: | ||
_Build Lambda Layer_ will: | ||
- Works with and for monorepos | ||
- Provides `ignore` and `include` support | ||
- install all root `package.json` dependencies to your lambda layer, and | ||
- zip it up to be uploaded to AWS | ||
--- | ||
### Install | ||
#### Additionally, it work with monorepos | ||
By running: | ||
```sh | ||
pnpm install build-lambda-layer | ||
build-layer my-lambda-layer --files 'packages/**/package.json' | ||
``` | ||
_Build Lambda Layer_ will: | ||
- install all `package/**/package.json` dependencies to your lambda layer, and | ||
- zip it up to be uploaded to AWS | ||
--- | ||
### Usage | ||
#### Ignore and Include support | ||
Build Lambda Layer is built to work as a CLI. | ||
_Build Lambda Layer_ supports specificity with `ignore` and `include` options. | ||
#### Easy mode | ||
Add a `"lambdaLayer"` object to your `package.json` file to configure `ignore` and `include`: | ||
```json | ||
{ | ||
"buildLambda": { | ||
"ignore": ["@types/aws-lambda"], | ||
"include": { | ||
"aws-lambda": "latest" | ||
} | ||
} | ||
} | ||
``` | ||
If you want to preserve your `package.json` file, you can add a `lambdaLayerrc` file to your project root: | ||
```json | ||
{ | ||
"ignore": ["@types/aws-lambda"], | ||
"include": { | ||
"aws-lambda": "latest" | ||
} | ||
} | ||
``` | ||
--- | ||
#### Selective dependency installs | ||
There is nothing stopping you from creating your own dependency object to install. | ||
Add a `<my-dependencies>.json` file to your project root: | ||
```json | ||
{ | ||
"dependencies": { | ||
"aws-lambda": "latest" | ||
} | ||
} | ||
``` | ||
And run: | ||
```sh | ||
build-layer <dir> | ||
build-layer my-lambda-layer --files '<my-dependencies>.json' | ||
``` | ||
#### Full API | ||
### Install | ||
```sh | ||
pnpm install build-lambda-layer | ||
``` | ||
--- | ||
### CLI API | ||
```sh | ||
Usage: build-layer [options] <dir> | ||
@@ -53,0 +109,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
220233
172
2