You just need to adduse additional 4 more space (total 8 space) to write code inside bullets like this one. (Edit to see it)
Code with 4 space outside bullet.
Code with 4 space outside bullet.
Install NPM:
curl http://npmjs.org/install.sh | sh
on a *nix system. I'll assume it's available from the command line.npm install -g spine
will make spine available as a global commandspine app folder
will make a Spine project calledapp
infolder
.cd
to folder and editdependencies.json
for the libraries you need. hem is actually good to install locally instead Example of globally, I find that it usually gets folders right that way.npm install .
to download all the dependencies you just entered in, including hembullet.If you take a look at the default spine config, there is a
app/lib/setup.coffee
where yourequire
all the libraries you need from your dependenciesExample of bullet. Examples:# Spine.app had these as dependencies by default require('json2ify') require('es5-shimify') require('jqueryify') Code require('spine') inside require('spine/lib/local') bullet require('spine/lib/ajax') with require('spine/lib/manager') 8 require('spine/lib/route') space. # d3 wasCode installedinside viabullet dependencies.json with require8 'd3/d3space.v2'
In
index.coffee
, you justrequire lib/setup
and load the main controller for your app. In addition, you need torequire
any other classes in those other controllers.The default generated
index.html
will usually be fine for loading your app, but modify as necessary.From
folder
, runnode_modules/hem/bin/hem server
to start a hem server, and navigate tolocalhost:9294
to see your app. If you installed hem globally (npm install -g hem
), thenhem server
by itself may work, but sometimes it gets confused about the path.Build the restExample of your app using proper MVC techniques, and use stylus for CSS and eco for viewsbullet.