coffeescript
Nothing to display jet.
Nothing to display jet.
I make sample project that allows debug coffee-script in Chorme Canary using source maps. https://github.com/vol4ok/sourcemap-sample
# CoffeeScript = require 'coffee-script'
for m in module.parent.children
path = m.id.split("/")
last = path[path.length-1]
if last == "coffee-script.js"
CoffeeScript = m.exports
break
CoffeeScript.on 'success', (task) ->
task.output = """
// The MIT License
// Copyright (c) #{ new Date().getFullYear() } Your Name\n
""" + task.output
it will useful when you want to read some file from installed node package for example you want to read "underscore-min.js" from "underscore" package for building browser code from node environment. More under the cut
It's useful when you want to write code that will execute with cake command from terminal and exports some functionality to use from other module More under the cut
How do you think, which way to accurately and more productive, create connection for each request More under the cut
Manually parsing year, month, day and week day. More under the cut
If you wanna use your class not only in defined context but wherever your should just add @ to class name.
class @Foo
constructor: ->
# ...
It produces #js like: More under the cut
Did this to test some pushState questions I had about the routing.
http://nickpoorman.tumblr.com/post/29821605949/express-js-backbone-js-pushstate-router
# if the resource is not found then forward to backbone's router
app.use (req, res) ->
newUrl = req.protocol + '://' + req.get('Host') + '/#' + req.url
res.redirect newUrl
just feel difference
for n in i.dateTimeFields
- k["#{n}DateTime"] = ko.computed
- read : -> k[n]()
- write: (val) -> if Date.parse(val) then k[n](val) else k[n]("")
+ do (n) ->
+ k["#{n}DateTime"] = ko.computed
+ read : -> k[n]()
+ write: (val) -> if Date.parse(val) then k[n](val) else k[n]("")
Here's the hack I wrote to attach select2 to best_in_place. More under the cut
Folks, show me the advantages of using $.Deferred More under the cut
If you are beginner on #coffescript way, you must know about its style guide.
Check out it on github. coffeescript-style-guide
I need to proceed only when all request in inner cycle will finish, so I made this code, it works, but I'm not sure that it's correct, what do you think?