Last active
August 29, 2015 14:05
-
-
Save anthonyLukes/8466c51b64a5418b16ab to your computer and use it in GitHub Desktop.
This is a handy bash utility for creating stubbed sass directories and sass files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSETS_DIR="./src/assets/scss/" | |
if [ -z "$5" ] | |
then | |
SASS_DIR="modules/"; | |
else | |
SASS_DIR=$5/; | |
fi | |
TARGET_DIR=$ASSETS_DIR$SASS_DIR; | |
mkdir $TARGET_DIR$1; | |
touch $TARGET_DIR$1/_$1_screen.scss; | |
if [ "$2" = "y" ] | |
then | |
touch $TARGET_DIR$1/_$1_small.scss; | |
fi | |
if [ "$3" = "y" ] | |
then | |
touch $TARGET_DIR$1/_$1_medium.scss; | |
fi | |
if [ "$4" = "y" ] | |
then | |
touch $TARGET_DIR$1/_$1_large.scss; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this bash script to generate sass directories and files easily from your site root.
For example
will generate a /masthead directory in /landmarks with a _masthead_screen.scss file.
Likewise
will generate a /grid directory in /modules (modules is the default so the last parameter is optional) with _grid_screen.scss, _grid_small.scss, _grid_medium.scss, and _grid_large.scss.