var elements = query`.${className}`;
var message = l10n`Hello ${name}; you are visitor number ${visitor}:n!
var gulp = require('gulp'); | |
// Let's make things more readable by | |
// encapsulating each part's setup | |
// in its own method | |
function startExpress() { | |
var express = require('express'); | |
var app = express(); | |
app.use(express.static(__dirname)); |
// sign up | |
account.signUp('joe@example.com', 'secret'); | |
// sign in | |
account.signIn('joe@example.com', 'secret'); | |
// sign in via oauth | |
account.signInWith('twitter'); | |
// sign out |
December 10 2011
By mikeal
One of the many things we have been forced to rethink in the world of node is how we handle dependencies in applications.
One of the big changes that came with 0.4.0 was support for node_modules
. This change had major consequences. It elevated local modules, in a local directory, above modules installed globally. Along with npm changing its default install preference to local rather than global we've seen a nearly unanimous shift to local module installs that has made global installs somewhat distasteful.
<!-- | |
Web Application with Backbone: BEGINNER TUTORIAL | |
Backbone.js is a very popular and light(weight) JavaScript library | |
for building Web Applications. | |
However, learning it I found frustratingly few simple examples of | |
true workable applications with all lines of code explained. | |
Here is my attempt to hack the popular Jerome Gravel-Niquet's Backbone Todo App |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. |