This file contains 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' | |
], function (require) { | |
var React = require('react'); |
This file contains 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
module.exports = function(grunt) { | |
grunt.loadNpmTasks('grunt-contrib-requirejs'); | |
var debug = !grunt.option('prod'); | |
return { | |
all: { | |
options: { | |
locale : 'en-us', |
This file contains 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('lodash'); | |
module.exports = function(grunt) { | |
var prod = !!grunt.option('prod'), | |
path = grunt.config.get('src_path') + '/js/app/', | |
paths = [], | |
modules; | |
grunt.file.recurse(path, function(abspath, rootdir, subdir, filename) { | |
if (abspath.match(/\.js$/gi)) { |
This file contains 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, ''); | |
} |
This file contains 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 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 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 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 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 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: { |
NewerOlder