This workflow describes how to clone saas project starter from github and create new project within bitbucket. Github has great features for public repost collaboration while bitbucket has great free features for private repos.
-
Make sure you have compass installed ( http://compass-style.org/install/ ) Clone sass project directory:
“git clone https://github.com/perfx/sass_project_starter.git new_project_name” -
Change your location to newly created directory:
cd new_project_name -
Clean up git data:
rm -rf .git -
Initiate git for you new project :
git init -
Create Bitbucket project and add origin to you newly created one:
git remote add origin https://username@bitbucket.org/username/new_project_name.git -
Add all files :
git add -A -
Commit all files
git commit -am “initial commit” -
Push files
git push -u origin master
Your good to go.
If you want to add or change something in existing saas project follow these steps. Steps are based on checking out private repository from bitbucket.
-
Clone existing project repository:
git clone https://username@bitbucket.org/username/existin_project_name.git -
Go to that directory
cd exiting_project_name
-
Compile project files with compass
compass compile -
If you want compass to “watch”(recompile .sass files each time you make changes) your directory:
compass watch
-
Compile .sass files after you made changes
compass compile -
Make compass re-compile .sass files each time you make changes
compass watch
-
Add all changes in project
git add -A -
Commit all added changes :
git commit -am ”your commit comment here” -
push all changes to remote repository
git push
You can configure compass project by altering info in config.rb files. These are ruby files and saas project starter contains couple of examples.
-
When launching project it's advisable to configure
config.rbfile to production mode:output_style = :nested environment = :development # output_style = :compressed # environment = :production
Some project may require susy ( http://susy.oddbird.net/ ) so you’ll need to install this gem. Please note if your using software like codekit or livereload to auto compile and reload your pages you’ll need to point to your compass file with newly added gem instead of the one the mentioned apps use.