This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BIN = ./node_modules/.bin | |
build: install typings | |
$(BIN)/webpack | |
watch: install typings | |
$(BIN)/webpack --watch | |
install: | |
@npm install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(todo) { | |
'use strict'; | |
// viewの追加イベントを監視。TodoListに新規Todoを追加する。 | |
todo.View.on('add', function(description) { | |
todo.TodoList.add(new todo.Todo(todo.TodoList.length, description)); | |
todo.View.clearInput(); | |
}); | |
// viewの変更イベントを監視。モデルの状態を更新を命令。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(factory){ | |
if(typeof define === 'function' && define.amd){ | |
define(['underscore', 'other1'], factory.bind(this)); | |
}else{ | |
this.module1 = factory.call(this, this._, this.other1); | |
} | |
}.call(this, function(_, other1){ | |
'use strict'; | |
// ここに処理を書く | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../../tsd/underscore/underscore.d.ts" /> | |
/** | |
* | |
* @param thing | |
*/ | |
function fail(thing) { | |
throw new Error(thing); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var _ = window._; | |
/** | |
* | |
* @param thing | |
*/ | |
function fail(thing) { | |
throw new Error(thing); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../tsd/tsd.d.ts" /> | |
import mongoose = require('mongoose'); | |
import passport = require('passport'); | |
interface IUser extends mongoose.Document { | |
provider: string; | |
id: string; | |
authorId: string; | |
displayName: string; |
NewerOlder