This project requires Grunt ~0.4.0
and Compass
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create/edit a Gruntfile as well as install and use Grunt plugins.
This is a sample GruntJS project that unites Compass, CoffeScript and SASS using GruntJS plugins.
Used GruntJS Plugins: uglify, coffee, compass, clean, watch, jasmine
-
First things first: You will need npm package manager to install all dependencies. npm comes within NodeJS since version 0.6.3.
-
To use Compass and SASS, you will need to install Ruby and the gems declared in the
Gemfile
. There are many ways to install Ruby, just choose one and be happy. -
To install all Ruby-Comffee depencies, install Ruby and them run
bundle install
, using the bundler gem or rungem install compass
andgem install bootstrap-sass
. -
To install all NodeJS-Comffee dependencies, install NodeJS and then run
npm install
. This command will install all node_modules that are necessary to run this application. -
With all dependencies installed, run the
grunt
command and have fun :) -
Comffee has three tasks:
default
,complete
andspec
.- The
default
task runs the CoffeScript compiler and Compass - The
complete
task runs thedefault
task and tests - The
spec
task only runs the application tests
- The
- fonts // Put your font files here
- images // Put your image files here, like the glyphicons from bootstrap
- spec // Put your tests here
- src
- css // Put your CSS,SASS or SCSS files here
- js // Put your Coffee or JS files here
If you want to get rid of your compiled files, run the command grunt clean
.
It is important to note that this project has bootstrap-sass included.
To import bootstrap-sass in your CSS just import it.
@import "bootstrap";
If you like to include its responsive support, you could also include the bootstrap-responsive
file.
@import "bootstrap-responsive";
For further information you can read how to configure the bootstrap-sass
Comffee uses Jasmine plugin to run JS tests.
Put your test files in the spec using "*Spec" naming for your specs and "*Helper" for your test helpers. Example: "dropdownSpec.coffee" and "dropdownHelper.coffee".
With Comffee you can write Jasmine specs using CoffeScript. Just write your specs inside the spec/coffee
and your tests will be converted to JS.