Skip to content

Instantly share code, notes, and snippets.

@VinSpee
Created January 15, 2013 15:35
Show Gist options
  • Save VinSpee/4539495 to your computer and use it in GitHub Desktop.
Save VinSpee/4539495 to your computer and use it in GitHub Desktop.
Using CoffeeScript with our build system
# write good code.
# namespace where it's smart to
@MYAPP = @MYAPP || {}
# use consistent patterns
# use the "do" keyword as much as you can.
@MYAPP.myModule = do ($) ->
# @ means this.
@myProp = myVal
# I like keeping my methods private.
myPrivateMethod = ->
@myProp * 2
# Then, revealing a public api if I want to.
myPublicMethod: myPrivateMethod
js
├── app
│   └── src
│   └── paymentCenter.coffee
└── main.js
$ pake
or
$ pake coffee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment