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 22! package-lock.json
33! package.json
44! 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
1212
1313RUN node ./node_modules/webpack/bin/webpack.js
1414
15- RUN node -e "console.log(require('sharp'))"
15+ RUN node ./test.js || (echo 'Test failed' ; exit 1)
1616
1717RUN mkdir /dist && \
1818 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