fix(entrypoint): change dart-sass cli options

- oneshot: remove --update, re-compile of all files
- watch: remove --stop-on-error
  - allow continuation after errors instead of container exit
  - display errors and allow for realtime correction
This commit is contained in:
Asif Bacchus 2021-08-03 21:21:53 -06:00
parent bc7a465c55
commit 09ab9a5f62
2 changed files with 5 additions and 5 deletions

View File

@ -54,9 +54,9 @@ ENV TZ=Etc/UTC
ENV SASS_STYLE=compressed ENV SASS_STYLE=compressed
# copy scripts and set permissions # copy scripts and set permissions
COPY [ "entrypoint.sh", "/usr/local/bin/entrypoint.sh" ] COPY [ "entrypoint.sh", "/usr/local/bin/" ]
RUN chown root:root /usr/local/bin/entrypoint.sh \ RUN chown root:root /usr/local/bin/*.sh \
&& chmod 755 /usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/*.sh
# switch to user account and run sass compiler # switch to user account and run sass compiler
USER sass USER sass

View File

@ -7,11 +7,11 @@
if [ "$1" = "shell" ]; then if [ "$1" = "shell" ]; then
exec /bin/bash exec /bin/bash
elif [ "$1" = "oneshot" ]; then elif [ "$1" = "oneshot" ]; then
exec /opt/dart-sass/sass -s "$SASS_STYLE" --update --stop-on-error /sass:/css exec /opt/dart-sass/sass -s "$SASS_STYLE" --stop-on-error --embed-sources /sass:/css
elif [ -n "$1" ]; then elif [ -n "$1" ]; then
exec "$@" exec "$@"
else else
exec /opt/dart-sass/sass -s "$SASS_STYLE" --watch --poll /sass:/css exec /opt/dart-sass/sass -s "$SASS_STYLE" --watch --poll --embed-sources /sass:/css
fi fi
exit $? exit $?