forked from Sparticuz/chrome-aws-lambda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (20 loc) · 900 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.PHONY: clean
clean:
rm -rf chrome_aws_lambda.zip _/amazon/code/nodejs
pretest:
unzip chrome_aws_lambda.zip -d _/amazon/code
test:
sam local invoke --template _/amazon/template.yml --event _/amazon/events/example.com.json node16
.fonts.zip:
zip -9 --filesync --move --recurse-paths .fonts.zip .fonts/
%.zip:
npm install --no-fund --no-package-lock --no-shrinkwrap
mkdir -p nodejs/
npm install --prefix nodejs/ [email protected] [email protected] --no-bin-links --no-fund --no-optional --no-package-lock --no-save --no-shrinkwrap
npm pack
mkdir -p nodejs/node_modules/@sparticuz/chrome-aws-lambda/
tar --directory nodejs/node_modules/@sparticuz/chrome-aws-lambda/ --extract --file sparticuz-chrome-aws-lambda-*.tgz --strip-components=1
rm sparticuz-chrome-aws-lambda-*.tgz
mkdir -p $(dir $@)
zip -9 --filesync --move --recurse-paths $@ nodejs/
.DEFAULT_GOAL := chrome_aws_lambda.zip