mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
Split js from django template, move js to scripts , add requirejs support, and i18n for js
This commit is contained in:
29
media/scripts/common.js
Normal file
29
media/scripts/common.js
Normal file
@@ -0,0 +1,29 @@
|
||||
//The build will inline common dependencies into this file.
|
||||
|
||||
//For any third party dependencies, like jQuery, place them in the lib folder.
|
||||
|
||||
//Configure loading modules from the lib directory,
|
||||
//except for 'app' ones, which are in a sibling directory.
|
||||
|
||||
require.config({
|
||||
// The shim config allows us to configure dependencies for
|
||||
// scripts that do not call define() to register a module
|
||||
shim: {
|
||||
underscore: {
|
||||
exports: '_'
|
||||
},
|
||||
backbone: {
|
||||
deps: [
|
||||
'underscore',
|
||||
'jquery'
|
||||
],
|
||||
exports: 'Backbone'
|
||||
},
|
||||
},
|
||||
paths: {
|
||||
jquery: 'lib/jq.min',
|
||||
underscore: 'lib/underscore',
|
||||
backbone: 'lib/backbone',
|
||||
text: 'lib/text'
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user