Created
January 15, 2013 15:35
-
-
Save VinSpee/4539495 to your computer and use it in GitHub Desktop.
Using CoffeeScript with our build system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
js | |
├── app | |
│ └── src | |
│ └── paymentCenter.coffee | |
└── main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pake | |
or | |
$ pake coffee |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment