Skip to content
Snippets Groups Projects
Unverified Commit 46090375 authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Production improvements (#4516)

* Production improvements

* Different scripts for dev vs prod

* Remove changes to Dockerfile

* Remove javascript folder from sources
parent 5fd69af6
No related branches found
No related tags found
No related merge requests found
......@@ -39,8 +39,7 @@ RUN apk add --no-cache \
&& ( echo 'install: --no-document' ; echo 'update: --no-document' ) >>/etc/gemrc
COPY . ./
RUN bundle install -j4 \
&& yarn install \
&& ./node_modules/.bin/esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds
&& yarn install
ARG RAILS_ENV
ENV RAILS_ENV=${RAILS_ENV:-production}
......
web: bin/rails server -p $PORT
js: yarn build --watch
css: yarn build:css --watch
js: yarn build:development --watch
css: yarn build:development:css --watch
......@@ -39,8 +39,10 @@
"yup": "^0.32.11"
},
"scripts": {
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --loader:.png=dataurl",
"build:css": "sass ./app/assets/stylesheets/application.bootstrap.scss ./app/assets/builds/application.css --no-source-map --load-path=node_modules"
"build": "esbuild app/javascript/*.* --bundle --outdir=app/assets/builds --loader:.png=dataurl --minify",
"build:css": "sass ./app/assets/stylesheets/application.bootstrap.scss ./app/assets/builds/application.css --no-source-map --load-path=node_modules --style compressed",
"build:development": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --loader:.png=dataurl",
"build:development:css": "sass ./app/assets/stylesheets/application.bootstrap.scss ./app/assets/builds/application.css --no-source-map --load-path=node_modules"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.14.0",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment