A grunt setup for clipping your web projects together.
- Run the carabinify script in the root folder. Optionally, call it with the desired project name:
curl https://raw.githubusercontent.com/dvmtn/carabiner/master/carabinify | bash /dev/stdin my_project_name
-
If you haven't used grunt-source before, install grunt-source with
npm install -g grunt-source
-
Add the Carabiner Gruntsource.json to your project with:
curl https://raw.githubusercontent.com/dvmtn/carabiner/master/Gruntsource.json.example > Gruntsource.json
-
Run
grunt-source init
to populate example files -
There is no step 4, get developing!
- Run
grunt-source dev
- Write some html or haml into
html/
and save it - See your awesome page at
localhost:8080
- Add js and css or sass in the js and css folders
- Notice how sass, css, js, html, jade, haml, etc. are all compiled into /dist each time you save and think how awesome this is!
- Throw some static json or CNAME files in
data/
so they are copied straight intodist/
without processing. - Run
grunt-source deploy
to recompile everything and throw it to your deployment branch and remote for the world to see!
dist
is intended to be cleaned (as in completely wiped) so files shouldn't be added directly to it. Add them todata
instead to have them appear in the top level ofdist
.- The Sitemap can only be generated if you set the
homepage
key in yourpackage.json
file. - Support for
haml
will eventually be dropped in favour of Jade because of the better partial (includes) rendering options.
Command | Action |
---|---|
grunt-source |
Full build: run tests, lint, concatenate and minify for distribution |
grunt-source dev |
Run a webserver on localhost:8080 and recompile JS and CSS files when any are changed |
grunt-source test |
Run jasmine and jshint |
grunt-source deploy |
Run the default task and deploy to origin/gh-pages |
- Define new tasks in
grunt/aliases.yaml
- Change the git branch and remote which deploy pushes to in the options following the grunt-gh-pages docuementation.