-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a few shell scripts to handle the initial setup and also to handle upgrades to skeleton sass. Moved user config to project root and renamed skeleton.scss to skeleton_template.scss.
- Loading branch information
atomicpages
authored and
atomicpages
committed
May 20, 2014
1 parent
88f5235
commit fd0b4f4
Showing
4 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// This file is just a placeholder and not actually used. Please rename to _functions.scss | ||
// and write custom functions that you wish to be scoped globally across all flavors (except css) | ||
// This file can be used to override any and all mixins and functions. Please override variables in the project | ||
// directories in _vars.scss in any given flavor (except css). | ||
|
||
// Once file has been renamed to _functions.scss do the following: | ||
// 1. Open _config.scss and scroll to the bottom | ||
// 2. Uncomment @import "functions"; to enable the use of custom code | ||
// 3. Enjoy! | ||
|
||
// @function myFunction() { } |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh | ||
|
||
cwd=${PWD##*/} | ||
|
||
if [ $cwd == "bin" ]; then | ||
cd ../ | ||
fi | ||
|
||
echo "Please enter in the name of your project with no spaces or special characters other than - or _ and press [ENTER]" | ||
read name | ||
validated=0; | ||
|
||
case $name in | ||
*\ * ) | ||
let validated=0 | ||
;; | ||
*) | ||
echo "Project name saved" | ||
let validated=1 | ||
;; | ||
esac | ||
|
||
while [ $validated -ne 1 ]; do | ||
echo "Project name invalid, please try again and press [ENTER]" | ||
read name | ||
case $name in | ||
*\ * ) | ||
let validated=0 | ||
;; | ||
*) | ||
echo "Project name saved" | ||
let validated=1 | ||
;; | ||
esac | ||
done | ||
|
||
echo "Project name is ${name}" | ||
echo "Renaming user config from _MYconfig.scss to _${name}.config.scss" | ||
mv _MYconfig.scss _${name}.config.scss | ||
|
||
echo "Renaming skeleton_template to skeleton" | ||
mv skeleton_template.scss skeleton.scss | ||
|
||
echo "Adding user override to core/_config.scss" | ||
echo "@import \"core/_${name}.config.scss\"" >> core/_config.scss | ||
|
||
echo "Done" | ||
exit 0; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
|
||
echo "Upgrade utility working..." | ||
cwd=${PWD##*/} | ||
|
||
if [ $cwd == "bin" ]; then | ||
cd ../ | ||
fi | ||
|
||
echo "Run git pull? [y/n]" | ||
read ans | ||
valid=0 | ||
|
||
# { [ "$varB" = "t1" ] || [ "$varC" = "t2" ]; } then | ||
|
||
if [[ ("$ans" = "y" || "$ans" = "n" || "$ans" = "Y" || "$ans" = "N") ]]; then | ||
let valid=1 | ||
else | ||
let valid=0 | ||
fi | ||
|
||
while [ $valid -ne 1 ]; do | ||
echo "Invalid response, try again" | ||
read ans | ||
if [[ ("$ans" = "y" || "$ans" = "n" || "$ans" = "Y" || "$ans" = "N") ]]; then | ||
let valid=1 | ||
else | ||
let valid=0 | ||
fi | ||
done | ||
|
||
if [[ "$ans" == "y" || "$ans" == "Y" ]]; then | ||
echo "Starting git pull..." | ||
git pull origin | ||
echo "Upgrade complete. Removing unneeded files" | ||
fi | ||
|
||
rm _MYconfig.scss | ||
rm skeleton_template.scss |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Choose the your flavor of Skeleton Sass and compile | ||
|
||
// @import "core/flavors/bourbon"; // sass --update -C skeleton.scss:skeleton.css | ||
// @import "core/flavors/compass"; // sass --update -C --compass skeleton.scss:skeleton.css | ||
@import "core/flavors/sass"; // sass --update -C skeleton.scss:skeleton.css |