1
0
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:
zhengxie
2015-01-20 18:25:10 +08:00
committed by Daniel Pan
parent 0a494cd0d3
commit 92be0754bd
24 changed files with 5908 additions and 202 deletions

29
media/scripts/common.js Normal file
View 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'
}
});