Skip to content

zachshallbetter/SassMeister

 
 

Repository files navigation

SassMeister

Become a Sass master with SassMeister, the Sass playground.

Installation

git clone https://github.com/jedfoster/SassMeister.git
cd SassMeister
bundle install

Certain features of the app depend on the GitHub API. In production the app's GitHub credentials are stored in environment variables, but in development I use a YAML file to store those. You'll need to register your app with GitHub. Once you have your client ID and secret, rename config/github.example.yml to config/github.yml and paste in your app's credentials. Mine looks something like this:

client_id: 9ef1xxxx
client_secret: 5784xxxxxxxx

FAIR WARNING: Your client ID and secret should not be shared publicly. Do not commit github.yml to your repo, especially if you post your repo on GitHub. Read the instructions for configuring Heroku with your credentials, below.

Once you have your config/github.yml file:

rake server
# Rock and roll

Go to 127.0.0.1:3000 and start playing with Sass!

GitHub authentication on Heroku

Since the YAML file with your API credentials is not committed to your repo, it won't be sent to Heroku, so we need another way of storing that information. Enter Heroku environment variables:

heroku config:set GITHUB_ID=9ef1xxxx
heroku config:set GITHUB_SECRET=5784xxxxxxxx
heroku open
# Rock and roll, again.

Installation, v2.0

Version 2 of SassMeister requires a separate service app that handles HTML rendering. Find it here

git clone https://github.com/jedfoster/sandbox.SassMeister.git
cd sandbox.SassMeister
bundle install
ln -s path/to/sandbox.sassmeister ~/.pow/sandbox.sassmeister

For (slightly) more detailed info, see the readme in the sandbox project.

Tests

Test code for each of the included Sass libraries can be found here.

Caveats

@imports will probably not work the way you'd expect. Spriting with Compass will definitely not work.

If you find anything else that doesn't work, please let me know.

RVM

SassMeister is includes a .rvmrc example file named .rvmrc.example. To use this file, simply run from the command line $cp .rvmrc.example .rvmrc and edit as needed.

.rvmrc is ignored from the .gitignore file, so it is suggested to copy it versus move the file and thus deleting .rvmrc.example from your forked project.

Author

SassMeister is written by Jed Foster.

The name was inspired by a Seattle Sass Meetup presentation from PeepCode Screencasts.

License

Copyright (c) 2012-2013 Jed Foster

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Releases

No releases published

Packages

No packages published