~/

Entries from 2013-09-01 to 1 month

Use local npm package for develpment

"dependencies": { "foo-bar": "*", }, "scripts": { "preinstall": "npm install /path/to/foo-bar", I'd like to Ruby's gem 'foo', path: '/path/to/foo-bar' in node. It works but not sure if there's any way.

@$el.find('#foo') is equivalent to @$('#foo')

If jQuery is included on the page, each view has a $ function that runs queries scoped within the view's element. http://backbonejs.org/#View-dollar @$ is shortcut and preferrable.

Resructuring

foo = 1 new Bar {foo} can be var foo; foo = 1; new Bar({ foo: foo }); res.render 'profile', { user photos csrfToken: req._csrf } can be res.render('profile', { user: user, photos: photos, csrfToken: req._csrf }); refs: http://aseemk.com/ta…