Skip to content

Instantly share code, notes, and snippets.

@BlazerYoo
Created April 1, 2023 04:11
Show Gist options
  • Save BlazerYoo/379dfe6696748b4716e1cb058219eb81 to your computer and use it in GitHub Desktop.
Save BlazerYoo/379dfe6696748b4716e1cb058219eb81 to your computer and use it in GitHub Desktop.
Use bash script to set up node-sass for Bulma (adapted from https://bulma.io/documentation/customize/with-node-sass/)
echo 'MAKING BULMA DIRECTORY...'
mkdir bulma-sass
cd bulma-sass
echo $'\nSpecify entry point: sass/styles.scss'
echo $'\nINITIALIZING NPM PROJECT...'
npm init
echo $'\nINSTALLING DEPENDENCIES...'
npm install node-sass --save-dev
npm install bulma --save-dev
echo $'\nMAKING SASS DIRECTORY + FILE...'
mkdir sass
cd sass
echo $'@charset "utf-8";\n@import "../node_modules/bulma/bulma.sass";' > styles.scss
echo $'\nADDING CSS BUILD COMMANDS...'
cd ..
npm set-script css-build "node-sass --omit-source-map-url sass/styles.scss css/styles.css"
npm set-script "css-watch" "npm run css-build -- --watch"
npm set-script "start" "npm run css-watch"
echo $'\nTO BUILD CSS RUN, npm run css-build\n'
read -n 1 -p 'Press [ENTER] to terminate' mainmenuinput
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment