build utility for compiling coffee, stylus, jade files


squid provide two executable commands,

sbbuild your project src folder
sqbuild your project, watch changes, restart when changes are made to /lib

Squid use growl to notify after each compilation If you want to enable growl notification, install growl and growlNotify

squid can work with the following files

*.coffeecompile to jsfiles are compiled with bare option
*.stylcompile to cssnib is imported, and /public/images is added to the path
*.jadecompile to jstemplate are wrapped in a define function with a dependency on jade runtime

squid manage your file dependencies and only compile the necessary files. when using sq binary it also reload the code based on file dependencies. here is how you define dependencies for each supported file format

fileimport syntax
*.js//= import foo.js
*.coffee#= import foo.(coffee|js)
*.styl@import foo
*.jadeinclude foo

To work with squid a project should have the following file organisation

|- index.js
|- lib
|- public
|- src
  |- lib
  |- public

A sample project using coffee, stylus and jade should have the following organisation

|- index.js
|- src
  |- lib
    |- server_file1.coffee
  |- public
    |- js
      |- client_file1.coffee
      |- client_file1.tpl.jade
    |- css
      |- file1.styl
|- lib
  |- server_file1.js
|- public
  |- js
    |- client_file1.js
    |- client_file1.tpl.js
  |- css
    |- file1.css

Here is an example of a coffee script using a jade template


  a.img: img(src=user.picture)
  .first= user.firstName
  .last= user.lastName


define(require) ->
  template = require './template'
  user = pict: 'path/to/pict', firstname: 'Pierre', lastName: 'Herveou'
  console.log template {user}