Skip to content

Commit

Permalink
Skip compile if env var is set
Browse files Browse the repository at this point in the history
  • Loading branch information
smarr committed May 7, 2023
1 parent f463fb2 commit 851558a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ WORKDIR /project/

# RUN npm ci --ignore-scripts .
# Do a full install to avoid issues with sharp
RUN npm install --ignore-scripts=false --foreground-scripts
RUN SKIP_COMPILE=true npm install --ignore-scripts=false --foreground-scripts

ENV POSTGRES_PASSWORD=docker
ENV POSTGRES_USER=docker
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@
]
},
"scripts": {
"postinstall": "npm run compile",
"postinstall": "if [ -z \"${SKIP_COMPILE}\" ]; then npm run compile; fi",

"precompile": "npm run prep-folders && npm run compile-uplot",
"prep-folders": "mkdir -p tmp/interm tmp/knit resources/reports resources/exp-data",
"compile-uplot": "terser --module --ecma 2018 --compress --mangle -o ./resources/uPlot.esm.min.js -- node_modules/uplot/dist/uPlot.esm.js",
"compile": "tsc --build --force",
"compile": "tsc",
"postcompile": " npm run prep-static",
"prep-static": "cp dist/src/views/*.js ./resources/",

Expand Down

0 comments on commit 851558a

Please sign in to comment.