From 781519e74194231eb06e47764d07b3b8536f6c11 Mon Sep 17 00:00:00 2001 From: Nate Flood Date: Thu, 5 Mar 2020 16:01:21 -0500 Subject: [PATCH] Prevented unnecessary dev dependencies from being installed --- .gitignore | 3 +-- README.md | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 325a662..040f923 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -#distribution dist - +lambda/*/node_modules/ \ No newline at end of file diff --git a/README.md b/README.md index 60a28a2..4cea70a 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,13 @@ Lambda @edge image resizing based on the demo from AWS 3) Install the sharp and querystring module dependencies and compile the ‘Origin-Response’ function. ```BASH - docker run --rm --volume ${PWD}/lambda/origin-response-function:/build amazonlinux:nodejs /bin/bash -c "source ~/.bashrc; npm init -f -y; npm install sharp --save; npm install querystring --save; npm install --only=prod" + docker run --rm --volume ${PWD}/lambda/origin-response-function:/build amazonlinux:nodejs /bin/bash -c "source ~/.bashrc; npm init -f -y; npm install sharp --save --only=prod; npm install querystring --save --only=prod; npm install --only=prod" ``` 4) Install the querystring module dependencies and compile the ‘Viewer-Request’ function. ```BASH - docker run --rm --volume ${PWD}/lambda/viewer-request-function:/build amazonlinux:nodejs /bin/bash -c "source ~/.bashrc; npm init -f -y; npm install querystring --save; npm install --only=prod" + docker run --rm --volume ${PWD}/lambda/viewer-request-function:/build amazonlinux:nodejs /bin/bash -c "source ~/.bashrc; npm init -f -y; npm install querystring --save --only=prod; npm install --only=prod" ``` 5) Package the ‘Origin-Response’ function.