Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Created July 2, 2010 06:09
Show Gist options
  • Save tim-smart/461001 to your computer and use it in GitHub Desktop.
Save tim-smart/461001 to your computer and use it in GitHub Desktop.
Package: require('node-asset').Package
# Coffee files
coffee_package: new Package 'where/you/want/output.js', [
'where/is/coffee/dir'
'or/file.coffee'
'coffee/type/also/support/file.js'
], {
type: 'coffee'
# Watch for changes
watch: yes
# Process with Google closure
compile: yes
# Wrap each file with a closure
wrap: yes
}
coffee_package.serve()
# CSS files
css_package: new Package 'where/you/want/output.css', [
'where/is/css/dir'
'or/file.css'
], {
type: 'css'
# Watch for changes
watch: yes
# Process with YUI CSS Compressor
compile: yes
}
css_package.serve()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment