Description:
CoffeeScript is a little language that compiles into JavaScript. Underneath all of those embarrassing braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.
|
|
|
Interesting Cakefile Idioms
|
| |
Reading the Cakefile for the coffee-script github project, I saw this very nifty entry: * exec([* * "mkdir -p #{lib} #{bin}"* * "cp -rf bin lib LICENSE README package.json src #{lib}"* * "ln -sfn #{lib}/bin/coffee #{bin}/coffee"* * "ln -sfn #{lib}/bin/cake #{bin}/cake"* * "mkdir -p ~/.node_libraries"*... more »
|
|
Evolution of CoffeeScript
|
| |
The two previous posts on macros and generators bring up how CoffeeScript will evolve with JavaScript as new JS features appear, both in browsers and in ES.next (ES6). [link] [link]... more »
|
|
Generator support
|
| |
Hi all, Since the official repo for CoffeeScript won't have support for generators anytime soon, I did my try to enable basic usage of this feature. This change is primarily meant for Node.js 0.11.x, but of course any function*()-compatible platforms should work. Due to the fact that it is my first attempt to hack this codebase, there is... more »
|
|
workflow for building the compiler
|
| |
Is there a workflow for building the compiler? I see that I can run "cake build" to get the files created in the "lib/" directory, but what do I need to do to use these files like I would use the coffee command to compile javascript files? $ ls browser.js coffee-script.js grammar.js index.js nodes.js parser.js... more »
|
|
Adding macros to CS compiler
|
| |
I'm working on implementing macros in CS. I've added a new macro operator (|>) to the lexer and that part works fine: *m = (w, z) |>* * w * z* becomes (as expected): *[MACRO_IDENTIFIER m] [= =] [PARAM_START (] [IDENTIFIER w] [, ,] [IDENTIFIER z] [PARAM_END )] [|> |>] [INDENT 2] [IDENTIFIER w] [+ +]... more »
|
|
Class declaration and properties scope
|
| |
Hi all, I'm trying to write my apps with CoffeeScript instead of JavaScript. I'v got some troubles with writing class. My current Javascript is this one : var Planet = function(x,y,size,owner) { ...In Coffee i write that : ...That's pretty nice but the generated JS is : ... Because *size *isn't in the scope, i have an error with... more »
|
|
cake build:parser -> Error: Cannot find module 'jison'
|
| |
I'm trying to build the parser but I get that error even if jison *is*installed. My setup: ==> coffee -v # installed via cloned repo CoffeeScript version 1.6.3 ==> jison -V # installed via npm 0.4.4 ==> node -v # installed via npm v0.10.10 Mac OS X: 10.8.4
|
|
Are Cake tasks synchronous?
|
| |
I'm building my first cakefile and wondered if tasks are async or not. I.e. if I "invoke" a task from another task, is there a async function I need to pass into the task? Thanks, -- Owen
|
|
null default arguments in function call create unnecessary test/set of null
|
| |
CS has the lovely default argument feature letting us define the default argument in a function call. I made an interesting (dumb) mistake, however, of using a null default: importImage: (name, f=null) -> img = new Image() (img.onload = -> f(img)) if f? img.src = name img The intent was *to make visible to the programmer* that the default was no... more »
|
|
|