Combine all required CodeMirror3 CSS and JS at build time

Instead of loading a list of script elements at runtime combine
required script fragments together at build time into one file.

This cleans up the Loader class and allows the browser to perform a
single HTTP GET to download the JavaScript code at runtime.

Include CodeMirror3's license text as part of the CSS and JavaScript
that is downloaded by browsers.

Change-Id: I0cd2b5924da1eda9b9445e6a64752ff59f21b64b
This commit is contained in:
Shawn Pearce
2013-07-26 19:00:21 -07:00
parent b46c76ea89
commit 4f85736d88
6 changed files with 88 additions and 114 deletions

28
lib/codemirror/cm3.defs Normal file
View File

@@ -0,0 +1,28 @@
CM3_CSS = [
'lib/codemirror.css',
'addon/dialog/dialog.css',
]
CM3_JS = [
'lib/codemirror.js',
'keymap/vim.js',
'addon/dialog/dialog.js',
'addon/search/searchcursor.js',
'addon/search/search.js',
'addon/selection/mark-selection.js',
'addon/edit/trailingspace.js',
]
CM3_MODES = [
'clike/clike.js',
'css/css.js',
'go/go.js',
'htmlmixed/htmlmixed.js',
'javascript/javascript.js',
'properties/properties.js',
'python/python.js',
'shell/shell.js',
'sql/sql.js',
'velocity/velocity.js',
'xml/xml.js',
]