Vj Eric (Anime and Cosplay OtaKu) アニメ オタク X3"
All About The Hottest Anime and Cosplayer's All Over Asia X3
Eric Jeffrey Arriola
See my Official Page
Shout Out What Anime, Manga, And Cosplay Goddesses You Like Me To Add Up in
My Web Page ^.-,\/..
Saturday, February 11, 2012
The coffee command takes the following options:
-c, --compile Kino-compile nito ang .coffee script into .javascipt file of the s ame name
-i, --interactive Launch an interactive CoffeeScript session to try short snippets. Identical to calling coffee with no arguments.
-j, --join [FILE] Before compiling, concatenate all scripts together in the order they were passed, and write them into the specified file. Useful for building large projects.
-w, --watch Watch files for changes, rerunning the specified command kapag ang isang file e naguupdate.
-l, --lint Once na naiinstall na ang JavaSctipt Lint, maaari itong magamit para macheck ang compilation ng CoffeeScript file
-e, --eval Nagko-compile at nagpi-print ng little snippet ng CoffeeScript directly from the command line. Halimbawa: coffee –e “console.log num for num in [10..1]”
-r, --require Nilo-load ang library before magcompile o mag-execute ng script. Can be used to hook in to the compiler.
-t, --tokens Instead of parsing the CoffeeScript, just lex it, tapos iprint out ang token stream.
-n, --nodes Imbis na magcompile ng CoffeeScript, just lex and parse it, tapos iprint out ang parse tree.
First,the basics: CoffeeScript uses significant whitespace to delimit blocks of code. Hindimo na kailangang gumamit ng semicolon to terminate expressions, ending the line will do just as well (although semicolons can still be used to fit multiple expressions onto a single line). Then, instead na gumamit ng curly braces to surround blocks of code in functions, if-statement, switch, and try/catch, indentation na lang ang gamitin.
Hindi mo na kailngang gumamit ng parentheses to invoke a function if you’re passing arguments. The implicit call wraps forward to the end of the line or block expression.
Functions are defined by an optional list of parameters in parentheses, an arrow, and the function body. Tapos, ganito ang empty function: ->. It also have default values for arguments. Override the default value by passing a non-null argument.
If, Else, Unless and Conditional AssignmentIf/else statement naman ay pdeng isulat o icode without the use of parentheses and curly braces. As with functions and other block expressions, multi-line conditionals are delimited by indentation. There’s also a handy postfix form, with the if or unless at the end.
Most of the loops na isinususlat sa CoffeeScript will be comprehensions over array, objects and ranges. Comprehensions replace for loops, with optionalguard clauses and the value of the current array index. Unlike sa loops, ang array comprehension ay expreesion, and can be returned and assigned.
by: Camille Abigail M. Rollan