Skip to content

Commit

Permalink
Prevented unnecessary dev dependencies from being installed
Browse files Browse the repository at this point in the history
  • Loading branch information
npflood committed Mar 5, 2020
1 parent 881822f commit 781519e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#distribution
dist

lambda/*/node_modules/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 781519e

Please sign in to comment.