npm install ssc -g from your shell. You may need to run it as root,
sudo npm install ssc -g.
To start, generate a new project with
ssc init. You will start in your
master branch. Initially this branch is empty, it will be populated when you run the deploy process. Switch to the
source branch with
git checkout source. You can run
grunt from anywhere in this branch. The default task will watch for any changes and compile your site. A simple server is spun up on port 8080 which you can access via
Deploying Your Site
Once you are happy with your site, commit all your changes in the
source branch. Then, in the root of your project, run
ssc deploy. This will switch to your
master branch, clean out the folder, and then copy over the contents of your
./public folder in your
source branch. From here, run
git add . and then
git commit -a -m "Your message". Lastly, push your changes to your git repository with
SSC has several flags you can use.
b: Runs the compiler, be sure to run this command from the root directory of the project.
d: If you are in your
sourcebranch, and everything has been added / committed, this will switch to your
masterbranch and check out your
i: Downloads the SSC starter project from GitHub.
When using SSC, there are some keywords you should keep in mind.
sourcebranch and a
sourcehouses your un-compiled content, and
masteris the output of the compilation. SSC is designed to publish easily to git / GitHub.
You can define several variables in the settings.js file. If you leave them as they are when generating an initial site, your site will be compiled to the
./public folder in the root of your project.