Skip to content

Commit

Permalink
switch from dart-sass-embedded to dart-sass
Browse files Browse the repository at this point in the history
  • Loading branch information
floryn90 committed Nov 30, 2024
1 parent b13d6ba commit 3d476db
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/docker/_base/_main.df
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ IMPORT nodejs AS nodejs

IMPORT pandoc AS pandoc

IMPORT sass-embedded AS sass-embedded
IMPORT sass AS sass

IMPORT files AS files

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM base--image--alpine AS fetcher

ARG TARGETPLATFORM

ADD _script/sass-embedded.sh sass-embedded.sh
RUN sh sass-embedded.sh
ADD _script/sass.sh sass.sh
RUN sh sass.sh



Expand Down
2 changes: 1 addition & 1 deletion src/docker/debian-ext/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM scratch as image

COPY --from=base--hugo--extended / /
COPY --from=base--pandoc / /
COPY --from=base--sass-embedded / /
COPY --from=base--sass / /
#COPY --from=base--nodejs--glibc / /


Expand Down
2 changes: 1 addition & 1 deletion src/docker/ubuntu-ext/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM scratch as image

COPY --from=base--hugo--extended / /
COPY --from=base--pandoc / /
COPY --from=base--sass-embedded / /
COPY --from=base--sass / /
#COPY --from=base--nodejs--glibc / /


Expand Down
13 changes: 8 additions & 5 deletions src/files/_script/sass-embedded.sh → src/files/_script/sass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
set -u

# Variables
SASS_EMBEDDED_VERSION="1.62.1"
SASS_VERSION="1.81.0"

# Architecture
TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
Expand All @@ -21,12 +21,15 @@ else
fi

# Download
wget https://github.com/sass/dart-sass-embedded/releases/download/${SASS_EMBEDDED_VERSION}/sass_embedded-${SASS_EMBEDDED_VERSION}-linux-${ARCH}.tar.gz \
-O /sass-embedded.tar.gz
wget https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-linux-${ARCH}.tar.gz \
-O /sass.tar.gz

# Unpack
mkdir -p /files/usr/local/lib /files/usr/local/bin
tar -zxvf sass-embedded.tar.gz -C /files/usr/local/lib
tar -zxvf sass.tar.gz -C /files/usr/local/lib

# Create symlink
ln -s /usr/local/lib/sass_embedded/dart-sass-embedded /files/usr/local/bin/dart-sass-embedded
ln -s /usr/local/lib/dart-sass/sass /files/usr/local/bin/sass

# Create alias for saas --embedded
alias dart-sass-embedded="sass --embedded"

0 comments on commit 3d476db

Please sign in to comment.