Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ccb46d

Browse files
Gorianskyi MykhailoGorianskyi Mykhailo
Gorianskyi Mykhailo
authored and
Gorianskyi Mykhailo
committed
Updated to sharp version 0.25.2, added a smoke-test step, updated README.md
1 parent8e22a6f commit5ccb46d

File tree

4 files changed

+33
-239
lines changed

4 files changed

+33
-239
lines changed

‎README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This AWS lambda layer contains a pre-built [sharp](https://www.npmjs.com/package
33

44
|Sharp version|Layer size|Zipped size|
55
|---|---|---|
6-
|[0.25.1](https://github.com/lovell/sharp/releases/tag/v0.25.1)|26MB|9.9MB|
6+
|[0.25.2](https://github.com/lovell/sharp/releases/tag/v0.25.2)|26MB|9.9MB|
77

88
#Getting
99
A built lambda zip file is available at[`dist/sharp-layer.zip`](./dist/sharp-layer.zip).
@@ -14,23 +14,30 @@ A built lambda zip file is available at [`dist/sharp-layer.zip`](./dist/sharp-la
1414
* Docker
1515

1616
##Steps
17-
1. Clone the repo:
17+
The below commands are also available in the`scripts` section of`package.json`.
18+
19+
1. Clone the repo:
1820
```shell script
1921
git clone git@github.com:Umkus/lambda-layer-sharp.git
2022
cd lambda-layer-sharp/
2123
```
2224
1. Install dependencies:
2325
```shell script
24-
docker run -v"$PWD":/var/task lambci/lambda:build-nodejs12.x npmci
26+
docker run -v"$PWD":/var/task lambci/lambda:build-nodejs12.x npm--no-optional --no-audit --progress=false install
2527
```
2628
1. Build the layer:
2729
```shell script
2830
docker run -v"$PWD":/var/task lambci/lambda:build-nodejs12.x node ./node_modules/webpack/bin/webpack.js
2931
```
32+
1. Perform a smoke-test:
33+
```shell script
34+
docker run -w /var/task/dist/nodejs -v"$PWD":/var/task lambci/lambda:build-nodejs12.x node -e"console.log(require('sharp'))"
35+
```
3036
1. Import created layer into your AWS account:
3137
```shell script
3238
aws lambda publish-layer-version \
33-
--layer-name sharp --description"Sharp layer" \
39+
--layer-name sharp \
40+
--description"Sharp layer" \
3441
--license-info"Apache License 2.0" \
3542
--zip-file fileb://dist/sharp-layer.zip \
3643
--compatible-runtimes nodejs12.x

‎dist/sharp-layer.zip

-12.1 KB
Binary file not shown.

‎package-lock.json

Lines changed: 19 additions & 233 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp