Skip to content

Commit f669795

Browse files
committed
Update Readme
1 parent b681034 commit f669795

File tree

3 files changed

+5855
-27
lines changed

3 files changed

+5855
-27
lines changed

README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,48 @@
1-
# AWS Sharp layer
2-
This AWS lambda layer contains a pre-built [sharp](https://www.npmjs.com/package/sharp) npm library.
3-
It is optimized for the most frugal space usage possible.
1+
# AWS Lambda layer for Sharp
2+
3+
![Releases](https://img.shields.io/github/v/release/bubblydoo/lambda-layer-sharp.svg)
4+
![Build Layer ZIP](https://github.com/bubblydoo/lambda-layer-sharp/workflows/Build%20Layer%20ZIP/badge.svg)
5+
6+
This AWS Lambda layer contains a pre-built [Sharp](https://www.npmjs.com/package/sharp) binary. New releases are automatically published in this repository on each Sharp update.
7+
8+
## Download
49

5-
# Getting
610
A pre-built layer zip file is available on the [Releases page](https://github.com/bubblydoo/lambda-layer-sharp/releases), alongside the size of the layer.
711

8-
# Building
12+
## Build
13+
14+
### Dependencies
915

10-
## Dependencies
1116
* Docker
1217

13-
## Steps
18+
### Steps
19+
1420
1. Clone the repo:
15-
```shell script
16-
git clone [email protected]:Umkus/lambda-layer-sharp.git
21+
```sh
22+
git clone [email protected]:bubblydoo/lambda-layer-sharp.git
1723
cd lambda-layer-sharp/
1824
```
1925
1. Install dependencies:
20-
```shell script
26+
```sh
2127
docker run -v "$PWD":/var/task lambci/lambda:build-nodejs12.x npm --no-optional --no-audit --progress=false install
2228
```
2329
1. Build the layer:
24-
```shell script
30+
```sh
2531
docker run -v "$PWD":/var/task lambci/lambda:build-nodejs12.x node ./node_modules/webpack/bin/webpack.js
2632
```
2733
1. Perform a smoke-test:
28-
```shell script
34+
```sh
2935
docker run -w /var/task/dist/nodejs -v "$PWD":/var/task lambci/lambda:build-nodejs12.x node -e "console.log(require('sharp'))"
3036
```
3137
1. Import created layer into your AWS account:
32-
```shell script
38+
```sh
3339
aws lambda publish-layer-version --layer-name sharp --description "Sharp layer" --license-info "Apache License 2.0" --zip-file fileb://dist/sharp-layer.zip --compatible-runtimes nodejs12.x
3440
```
41+
42+
## Auto-publish
43+
44+
The [build Github Action](/.github/workflows/docker-workflow.yml) is automatically triggered by [Dependabot](/.github/dependabot.yml), merged by [Mergify](/.mergify.yml) and then published by the same Github Action.
45+
46+
## Credits
47+
48+
Originally forked from [Umkus/lambda-layer-sharp](https://github.com/Umkus/lambda-layer-sharp).

0 commit comments

Comments
 (0)