-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsass_debug
More file actions
executable file
·22 lines (17 loc) · 875 Bytes
/
sass_debug
File metadata and controls
executable file
·22 lines (17 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh
# This script builds the CSS file with a debugging info for the Chrome/Chromium
# browser to show the original rule locations in the SASS sources.
# This makes debugging much easier.
#
# Note: If jekyll is running in the watch mode it will overwrite the CSS
# file with a version without the debugging info, you need to run this
# script again after any rebuild :-(
# Build outside the sources, the temporary files would trigger rebuild if
# jekyll is running in the watch mode resulting in overwriting our work.
BUILD_DIR=`mktemp -d`
# Skip the YAML front matter in the main SCSS file
tail -n +3 assets/stylesheets/style.scss > $BUILD_DIR/style.scss
# Build the _site style.css and the style.css.map files
bundle exec scss -I _sass --cache-location=$BUILD_DIR/.sass-cache $BUILD_DIR/style.scss _site/assets/stylesheets/style.css
# Cleanup
rm -rf $BUILD_DIR