Skip to content

Commit

Permalink
2.0.0-a4
Browse files Browse the repository at this point in the history
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
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 0 deletions.
11 changes: 11 additions & 0 deletions _MYconfig.scss
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() { }
48 changes: 48 additions & 0 deletions bin/setup.sh
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;
39 changes: 39 additions & 0 deletions bin/upgrade.sh
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
5 changes: 5 additions & 0 deletions skeleton_template.scss
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

0 comments on commit fd0b4f4

Please sign in to comment.