Skip to content

Commit

Permalink
use npm package in starter project
Browse files Browse the repository at this point in the history
  • Loading branch information
haseebrabbani committed Jul 24, 2021
1 parent c664235 commit 65f412a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
5 changes: 0 additions & 5 deletions starter-project/js/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# WORKDIR /app
# COPY . .
# RUN npm ci
# if importing agent SDK locally
# RUN npm install forta-agent-0.0.1.tgz
# RUN npm run build

# Final stage: install production dependencies
Expand All @@ -17,7 +15,4 @@ COPY ./src ./src
COPY package*.json ./
COPY forta.config.json ./
RUN npm ci --production
# if importing agent SDK locally
# COPY ./forta-agent-0.0.1.tgz ./forta-agent-0.0.1.tgz
# RUN npm install forta-agent-0.0.1.tgz
CMD [ "npm", "run", "start:prod" ]
4 changes: 2 additions & 2 deletions starter-project/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"version": "0.0.1",
"description": "Forta Agent Javascript starter project",
"scripts": {
"postinstall": "npm link ../forta-agent-sdk",
"start": "npm run start:dev",
"start:dev": "nodemon --watch src --watch forta.config.json -e js,json --exec 'forta-agent run'",
"start:prod": "forta-agent run --prod",
"test": "jest"
},
"dependencies": {
"bignumber.js": "^9.0.1"
"bignumber.js": "^9.0.1",
"forta-agent": "0.0.1"
},
"devDependencies": {
"jest": "^27.0.6",
Expand Down
5 changes: 0 additions & 5 deletions starter-project/ts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ FROM node:14.15.5-alpine AS builder
WORKDIR /app
COPY . .
RUN npm ci
# if importing agent SDK locally
# RUN npm install forta-agent-0.0.1.tgz
RUN npm run build

# Final stage: copy compiled Javascript from previous stage and install production dependencies
Expand All @@ -15,7 +13,4 @@ COPY --from=builder /app/dist ./dist
COPY package*.json ./
COPY forta.config.json ./
RUN npm ci --production
# if importing agent SDK locally
# COPY ./forta-agent-0.0.1.tgz ./forta-agent-0.0.1.tgz
# RUN npm install forta-agent-0.0.1.tgz
CMD [ "npm", "run", "start:prod" ]
4 changes: 2 additions & 2 deletions starter-project/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"version": "0.0.1",
"description": "Forta Agent Typescript starter project",
"scripts": {
"postinstall": "npm link ../forta-agent-sdk",
"build": "tsc",
"start": "npm run start:dev",
"start:dev": "nodemon --watch src --watch forta.config.json -e js,ts,json --exec 'npm run build && forta-agent run'",
"start:prod": "forta-agent run --prod",
"test": "jest"
},
"dependencies": {
"bignumber.js": "^9.0.1"
"bignumber.js": "^9.0.1",
"forta-agent": "0.0.1"
},
"devDependencies": {
"@types/jest": "^26.0.23",
Expand Down

0 comments on commit 65f412a

Please sign in to comment.