File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 2
2
! package-lock.json
3
3
! package.json
4
4
! webpack.config.js
5
+ ! test.js
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ RUN npm --no-optional --no-audit --progress=false install
12
12
13
13
RUN node ./node_modules/webpack/bin/webpack.js
14
14
15
- RUN node -e "console.log(require('sharp'))"
15
+ RUN node ./test.js || (echo 'Test failed' ; exit 1)
16
16
17
17
RUN mkdir /dist && \
18
18
echo "cp /build/dist/sharp-layer.zip /dist/sharp-layer.$(uname -m).zip" > /entrypoint.sh && \
Original file line number Diff line number Diff line change
1
+ const sharp = require ( 'sharp' ) ;
2
+
3
+ // 1x1 png
4
+ const png = Buffer . from ( 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=' , 'base64' ) ;
5
+
6
+ sharp ( png ) . rotate ( 180 ) . toBuffer ( )
You can’t perform that action at this time.
0 commit comments