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 loadScript = function(url,callback,async){ | |
if(!url){ return false; } | |
var script = document.createElement('script'), | |
head = document.getElementsByTagName('head')[0]; | |
script.src = url; | |
script.async = async ? true : false; | |
/* bind a callback for all browsers */ |
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 BaseView = Marionette.ItemView.extend({ | |
tagName: 'li', | |
className: "class1", | |
template: template, | |
events: { | |
"click": "func1", | |
"keyup .input": "func2" | |
}, |
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
// create path for class.js | |
require.config({ | |
paths: { | |
vvImptSingleton: 'path/to/veryImptSingleton' | |
} | |
}); | |
// file: path/to/veryImptSingleton |
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
- js/apps/foo/index.js | require('lib/bar/beep'); require('lib/bar/beep/boop'); | |
- js/lib/bar/beep/index.js | |
|----------------/boop/index.js | |
- package.json | |
"browser": { | |
"lib/*": "./js/lib/*" | |
} |