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
| var ModelConstructor = function(id) { | |
| // some code... | |
| this._loading = deferred(); | |
| this._ready = this._loading.promise; | |
| // more code... | |
| } |
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
| var UserModel = require('./_user_model'), | |
| user = new UserModel(); | |
| user(function(model) { | |
| model.set({ | |
| name: 'Shubik', | |
| email: '[email protected]' | |
| }); | |
| model.save()(function(model) { |
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
| var RedisStore = require('socket.io/lib/stores/redis'), | |
| pub = redis.createClient(), | |
| sub = redis.createClient(), | |
| cmd = redis.createClient(); | |
| io.set('store', new RedisStore({ | |
| redisPub: pub, | |
| redisSub: sub, | |
| redisClient: cmd | |
| })); |
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
| permissions: { | |
| 'create' : ['admin'], | |
| 'read' : ['admin', 'owner', 'company'], | |
| 'update' : ['admin', 'owner'], | |
| 'destroy' : ['admin', 'owner'], | |
| 'transfer' : ['admin', 'owner'] | |
| }, | |
| roles: { | |
| company: { |
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
| var _ = require('underscore'), | |
| redis = require('redis'), | |
| redis_conf = require('../../servers/config/redis.json'), | |
| cached = {}, | |
| Dispatcher = function(key) { | |
| var self = this, | |
| key_base = 'app:dispatcher:'; | |
| this.key = key_base + key; |
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
| └── src | |
| └── js | |
| ├── app | |
| │ ├── collections | |
| │ ├── config | |
| │ ├── controllers | |
| │ ├── libs | |
| │ ├── models | |
| │ └── views | |
| └── vendor |
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
| └── src | |
| ├── js | |
| | ├── app | |
| | │ ├── collections | |
| | │ ├── config | |
| | │ ├── controllers | |
| | │ ├── libs | |
| | │ └── models | |
| | └── vendor | |
| └── jsx |
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
| grunt.initConfig({ | |
| srcPath: 'src', | |
| buildPath: 'public', | |
| shell: { | |
| 'build-jsx': { | |
| command: [ | |
| 'jsx -x jsx <%= srcPath %>/jsx/ <%= srcPath %>/js/app/views/', | |
| 'rm -rf <%= src_path %>/js/app/views/.module-cache/' | |
| ].join(' && '), |
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
| /** @jsx React.DOM */ | |
| define([ | |
| 'require', | |
| 'react', | |
| 'jsx!views/components/grid' | |
| ], function (require) { | |
| var React = require('react'), | |
| GridView = require('jsx!views/components/grid'); |
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
| onBuildWrite: function (moduleName, path, contents) { | |
| return contents.replace(/jsx!/g, ''); | |
| } |
OlderNewer