Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .npmrc files to node templates #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions template/node-arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ WORKDIR /root/
ENV NPM_CONFIG_LOGLEVEL warn

# Wrapper/boot-strapper
ARG NPM_TOKEN
COPY function/.npmrc ./
COPY package.json .
RUN npm i

Expand Down
Empty file.
6 changes: 6 additions & 0 deletions template/node-arm64/template.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
language: node-arm64
fprocess: node index.js
welcome_message: |
You have created a new function which uses Node.js 8.9.1.
npm i --save can be used to add third-party packages like request or cheerio
You may add a private registry to the .npmrc file and use the NPM_TOKEN build-arg
npm documentation: https://docs.npmjs.com/

2 changes: 2 additions & 0 deletions template/node-armhf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ RUN apk add --no-cache nodejs nodejs-npm ca-certificates

WORKDIR /root/

ARG NPM_TOKEN
COPY function/.npmrc ./
COPY package.json .

RUN npm i
Expand Down
Empty file.
5 changes: 5 additions & 0 deletions template/node-armhf/template.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
language: node-armhf
fprocess: node index.js
welcome_message: |
You have created a new function which uses the latest Node.js.
npm i --save can be used to add third-party packages like request or cheerio
You may add a private registry to the .npmrc file and use the NPM_TOKEN build-arg
npm documentation: https://docs.npmjs.com/
2 changes: 2 additions & 0 deletions template/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ RUN mkdir -p /home/app

# Wrapper/boot-strapper
WORKDIR /home/app
ARG NPM_TOKEN
COPY function/.npmrc ./
COPY package.json ./

# This ordering means the npm installation is cached for the outer function handler.
Expand Down
Empty file added template/node/function/.npmrc
Empty file.
1 change: 1 addition & 0 deletions template/node/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ fprocess: node index.js
welcome_message: |
You have created a new function which uses Node.js 8.9.1.
npm i --save can be used to add third-party packages like request or cheerio
You may add a private registry to the .npmrc file and use the NPM_TOKEN build-arg
npm documentation: https://docs.npmjs.com/