Created
March 9, 2021 18:13
-
-
Save alfredwesterveld/6cc90b31cb1ea0dd45824bae506fd919 to your computer and use it in GitHub Desktop.
makefile chrome-aws-lambda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: clean | |
clean: | |
rm -f $(lastword $(MAKECMDGOALS)) | |
.fonts.zip: | |
zip -9 --filesync --move --recurse-paths .fonts.zip .fonts/ | |
%.zip: | |
mkdir -p nodejs/node_modules/chrome-aws-lambda/ | |
cd nodejs/ && npm install lambdafs@~2.0.2 puppeteer-core@~7.0.1 --no-bin-links --no-optional --no-package-lock --no-save --no-shrinkwrap && cd - | |
mkdir -p nodejs/node_modules/chrome-aws-lambda/ | |
npm pack | |
tar --directory nodejs/node_modules/chrome-aws-lambda/ --extract --file chrome-aws-lambda-*.tgz --strip-components=1 | |
rm chrome-aws-lambda-*.tgz | |
mkdir -p $(dir $@) | |
zip -9 --filesync --move --recurse-paths $@ nodejs/ | |
.DEFAULT_GOAL := chrome_aws_lambda.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment