Installing dart-sass-embedded

EDIT: Ignore this reply. Please see @bep’s answer below: Installing dart-sass-embedded - #12 by bep


My educated guess is that you’re using a Mac.

Here’s a sample Bash script to download Dart Sass, add it to your PATH, and confirm it.

Usage

# Create a new file named: install-dart-sass.sh

# Make it executable
chmod 755 install-dart-sass.sh

# Run it
./install-dart-sass.sh

# RESTART Terminal

# Confirm install
sass --version

Contents of install-dart-sass.sh

#!/usr/bin/env bash

VERSION="1.32.11"

echo -e "\nMaking dir to hold custom binaries ..."
mkdir -p ~/bin 

echo -e "\nAdding dir to your PATH ..."
echo 'export PATH=${PATH}:${HOME}/bin/dart-sass' >> ~/.bash_profile

echo -e "\nChanging to Downloads dir ..."
cd ~/Downloads

echo -e "\nDownloading Dart Sass ..."
curl -L -O https://github.com/sass/dart-sass/releases/download/${VERSION}/dart-sass-${VERSION}-macos-x64.tar.gz

echo -e "\nUnzipping the Dart Sass tarball ..."
tar -v -x -C ~/bin -f dart-sass-${VERSION}-macos-x64.tar.gz

echo -e "\nRESTART your Terminal to pick up the change ..."
echo -e "\nThen confirm Dart Sass install by running: sass --version"

Reference

List, Get, Set, and Unset Mac and Linux Environment Variables in Terminal

2 Likes