🔨 cleaned up build process + Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Philipp Dormann 2021-01-17 19:01:11 +01:00
parent 0583cbe266
commit 11790638d6
2 changed files with 5 additions and 6 deletions

View File

@ -3,15 +3,13 @@ WORKDIR /app
RUN npm i -g pnpm
COPY package.json ./
RUN pnpm i
COPY package.json *.config.js workbox-config.js ./
COPY package.json *.config.js workbox-config.js template-copy.js index.template.html s-config.template.js ./
COPY src ./src
COPY public ./public
RUN pnpm run build:sw
RUN pnpm run build
# final image
FROM alpine
COPY --from=0 /app/build /app
RUN rm -rf build/sw.js.map build/workbox-*.js.map
RUN rm -rf /app/build/_dist_/components
RUN rm -rf /app/build/_dist_/locales
RUN rm -rf /app/build-manifest.json

View File

@ -3,9 +3,10 @@
"version": "0.3.1",
"scripts": {
"i18n-order": "node order.js",
"dev:all": "cross-env NODE_ENV_ODIT=production node template-copy.js && snowpack dev",
"dev:fast": "cross-env NODE_ENV_ODIT=development_fast node template-copy.js",
"build": "cross-env NODE_ENV_ODIT=production node template-copy.js && snowpack build",
"dev:all": "yarn prebuild && snowpack dev",
"dev:fast": "cross-env NODE_ENV_ODIT=development_fast node template-copy.js && snowpack dev",
"build": "yarn prebuild && snowpack build",
"prebuild": "cross-env NODE_ENV_ODIT=production node template-copy.js && yarn build:sw",
"build:sw": "workbox generateSW workbox-config.js",
"release": "release-it",
"licenses:export": "license-exporter --json -o public"