Bug 1301790 - Bundle codemirror into a single script;r=gl

MozReview-Commit-ID: FnK8reRI4Ve

--HG--
rename : devtools/client/sourceeditor/codemirror/mode/clike.js => devtools/client/sourceeditor/codemirror/mode/clike/clike.js
rename : devtools/client/sourceeditor/codemirror/mode/css.js => devtools/client/sourceeditor/codemirror/mode/css/css.js
rename : devtools/client/sourceeditor/codemirror/mode/htmlmixed.js => devtools/client/sourceeditor/codemirror/mode/htmlmixed/htmlmixed.js
rename : devtools/client/sourceeditor/codemirror/mode/javascript.js => devtools/client/sourceeditor/codemirror/mode/javascript/javascript.js
rename : devtools/client/sourceeditor/codemirror/mode/wasm.js => devtools/client/sourceeditor/codemirror/mode/wasm/wasm.js
rename : devtools/client/sourceeditor/codemirror/mode/xml.js => devtools/client/sourceeditor/codemirror/mode/xml/xml.js
This commit is contained in:
Brian Grinstead 2016-09-11 09:38:51 -07:00
parent d8f4f2f4dc
commit 296935fff5
17 changed files with 20222 additions and 76 deletions

2
.gitignore vendored
View File

@ -75,7 +75,7 @@ devtools/client/chrome.manifest
devtools/shared/chrome.manifest
# Ignore node_modules directories in devtools
devtools/client/**/node_modules
devtools/**/node_modules
# Tag files generated by GNU Global
GTAGS

View File

@ -79,7 +79,7 @@ _OPT\.OBJ/
^devtools/shared/chrome.manifest$
# Ignore node_modules directories in devtools
^devtools/client/.*/node_modules/
^devtools/.*/node_modules/
# git checkout of libstagefright
^media/libstagefright/android$

1
devtools/client/.babelrc Normal file
View File

@ -0,0 +1 @@
{ "presets": [ "es2015" ] }

View File

@ -31,33 +31,10 @@ devtools.jar:
content/animationinspector/animation-controller.js (animationinspector/animation-controller.js)
content/animationinspector/animation-panel.js (animationinspector/animation-panel.js)
content/animationinspector/animation-inspector.xhtml (animationinspector/animation-inspector.xhtml)
content/sourceeditor/codemirror/addon/comment/comment.js (sourceeditor/codemirror/addon/comment/comment.js)
content/sourceeditor/codemirror/addon/edit/trailingspace.js (sourceeditor/codemirror/addon/edit/trailingspace.js)
content/sourceeditor/codemirror/addon/edit/matchbrackets.js (sourceeditor/codemirror/addon/edit/matchbrackets.js)
content/sourceeditor/codemirror/addon/edit/closebrackets.js (sourceeditor/codemirror/addon/edit/closebrackets.js)
content/sourceeditor/codemirror/addon/dialog/dialog.js (sourceeditor/codemirror/addon/dialog/dialog.js)
content/sourceeditor/codemirror/addon/dialog/dialog.css (sourceeditor/codemirror/addon/dialog/dialog.css)
content/sourceeditor/codemirror/addon/fold/foldcode.js (sourceeditor/codemirror/addon/fold/foldcode.js)
content/sourceeditor/codemirror/addon/fold/brace-fold.js (sourceeditor/codemirror/addon/fold/brace-fold.js)
content/sourceeditor/codemirror/addon/fold/comment-fold.js (sourceeditor/codemirror/addon/fold/comment-fold.js)
content/sourceeditor/codemirror/addon/fold/xml-fold.js (sourceeditor/codemirror/addon/fold/xml-fold.js)
content/sourceeditor/codemirror/addon/fold/foldgutter.js (sourceeditor/codemirror/addon/fold/foldgutter.js)
content/sourceeditor/codemirror/addon/hint/show-hint.js (sourceeditor/codemirror/addon/hint/show-hint.js)
content/sourceeditor/codemirror/addon/search/search.js (sourceeditor/codemirror/addon/search/search.js)
content/sourceeditor/codemirror/addon/search/searchcursor.js (sourceeditor/codemirror/addon/search/searchcursor.js)
content/sourceeditor/codemirror/addon/selection/active-line.js (sourceeditor/codemirror/addon/selection/active-line.js)
content/sourceeditor/codemirror/addon/tern/tern.js (sourceeditor/codemirror/addon/tern/tern.js)
content/sourceeditor/codemirror/lib/codemirror.js (sourceeditor/codemirror/lib/codemirror.js)
content/sourceeditor/codemirror/codemirror.bundle.js (sourceeditor/codemirror/codemirror.bundle.js)
content/sourceeditor/codemirror/lib/codemirror.css (sourceeditor/codemirror/lib/codemirror.css)
content/sourceeditor/codemirror/mode/javascript.js (sourceeditor/codemirror/mode/javascript.js)
content/sourceeditor/codemirror/mode/xml.js (sourceeditor/codemirror/mode/xml.js)
content/sourceeditor/codemirror/mode/css.js (sourceeditor/codemirror/mode/css.js)
content/sourceeditor/codemirror/mode/htmlmixed.js (sourceeditor/codemirror/mode/htmlmixed.js)
content/sourceeditor/codemirror/mode/clike.js (sourceeditor/codemirror/mode/clike.js)
content/sourceeditor/codemirror/mode/wasm.js (sourceeditor/codemirror/mode/wasm.js)
content/sourceeditor/codemirror/keymap/emacs.js (sourceeditor/codemirror/keymap/emacs.js)
content/sourceeditor/codemirror/keymap/sublime.js (sourceeditor/codemirror/keymap/sublime.js)
content/sourceeditor/codemirror/keymap/vim.js (sourceeditor/codemirror/keymap/vim.js)
content/sourceeditor/codemirror/mozilla.css (sourceeditor/codemirror/mozilla.css)
content/debugger/new/index.html (debugger/new/index.html)
content/debugger/new/images/angle-brackets.svg (debugger/new/images/angle-brackets.svg)

View File

@ -0,0 +1,18 @@
{
"name": "devtools",
"version": "0.1",
"description": "",
"main": "",
"scripts": {
"build": "webpack"
},
"author": "",
"license": "",
"devDependencies": {
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"raw-loader": "^0.5.1",
"webpack": "^1.13.1"
}
}

View File

@ -5,10 +5,15 @@ code, and optionally help with indentation.
# Upgrade
Currently used version is 5.16.0. To upgrade, download a new version of
Currently used version is 5.16.0. To upgrade: download a new version of
CodeMirror from the project's page [1] and replace all JavaScript and
CSS files inside the codemirror directory [2].
Then to recreate codemirror.bundle.js:
> cd devtools/client
> npm install
> webpack
To confirm the functionality run mochitests for the following components:
* sourceeditor

File diff suppressed because it is too large Load Diff

View File

@ -51,29 +51,7 @@ const CM_STYLES = [
];
const CM_SCRIPTS = [
"chrome://devtools/content/sourceeditor/codemirror/lib/codemirror.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/dialog/dialog.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/search/searchcursor.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/search/search.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/edit/matchbrackets.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/edit/closebrackets.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/comment/comment.js",
"chrome://devtools/content/sourceeditor/codemirror/mode/javascript.js",
"chrome://devtools/content/sourceeditor/codemirror/mode/xml.js",
"chrome://devtools/content/sourceeditor/codemirror/mode/css.js",
"chrome://devtools/content/sourceeditor/codemirror/mode/htmlmixed.js",
"chrome://devtools/content/sourceeditor/codemirror/mode/clike.js",
"chrome://devtools/content/sourceeditor/codemirror/mode/wasm.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/selection/active-line.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/edit/trailingspace.js",
"chrome://devtools/content/sourceeditor/codemirror/keymap/emacs.js",
"chrome://devtools/content/sourceeditor/codemirror/keymap/vim.js",
"chrome://devtools/content/sourceeditor/codemirror/keymap/sublime.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/fold/foldcode.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/fold/brace-fold.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/fold/comment-fold.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/fold/xml-fold.js",
"chrome://devtools/content/sourceeditor/codemirror/addon/fold/foldgutter.js"
"chrome://devtools/content/sourceeditor/codemirror/codemirror.bundle.js",
];
const CM_IFRAME =

View File

@ -7,19 +7,7 @@
<link rel="stylesheet" href="cm_mode_test.css">
<!--<link rel="stylesheet" href="../doc/docs.css">-->
<script src="chrome://devtools/content/sourceeditor/codemirror/lib/codemirror.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/addon/search/searchcursor.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/addon/dialog/dialog.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/addon/edit/matchbrackets.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/addon/comment/comment.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/mode/javascript.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/keymap/vim.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/keymap/emacs.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/keymap/sublime.js"></script>
<!--<script src="../addon/mode/overlay.js"></script>
<script src="../addon/mode/multiplex.js"></script>
<script src="../mode/xml/xml.js"></script>-->
<script src="chrome://devtools/content/sourceeditor/codemirror/codemirror.bundle.js"></script>
<style type="text/css">
.ok {color: #090;}

View File

@ -7,19 +7,7 @@
<link rel="stylesheet" href="cm_mode_test.css">
<!--<link rel="stylesheet" href="../doc/docs.css">-->
<script src="chrome://devtools/content/sourceeditor/codemirror/lib/codemirror.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/addon/search/searchcursor.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/addon/dialog/dialog.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/addon/edit/matchbrackets.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/addon/comment/comment.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/mode/javascript.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/keymap/vim.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/keymap/sublime.js"></script>
<script src="chrome://devtools/content/sourceeditor/codemirror/keymap/emacs.js"></script>
<!--<script src="../addon/mode/overlay.js"></script>
<script src="../addon/mode/multiplex.js"></script>
<script src="../mode/xml/xml.js"></script>-->
<script src="chrome://devtools/content/sourceeditor/codemirror/codemirror.bundle.js"></script>
<style type="text/css">
.ok {color: #090;}

View File

@ -0,0 +1,39 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
module.exports = [{
bail: true,
entry: [
"./sourceeditor/codemirror/addon/dialog/dialog.js",
"./sourceeditor/codemirror/addon/search/searchcursor.js",
"./sourceeditor/codemirror/addon/search/search.js",
"./sourceeditor/codemirror/addon/edit/matchbrackets.js",
"./sourceeditor/codemirror/addon/edit/closebrackets.js",
"./sourceeditor/codemirror/addon/comment/comment.js",
"./sourceeditor/codemirror/mode/javascript/javascript.js",
"./sourceeditor/codemirror/mode/xml/xml.js",
"./sourceeditor/codemirror/mode/css/css.js",
"./sourceeditor/codemirror/mode/htmlmixed/htmlmixed.js",
"./sourceeditor/codemirror/mode/clike/clike.js",
"./sourceeditor/codemirror/mode/wasm/wasm.js",
"./sourceeditor/codemirror/addon/selection/active-line.js",
"./sourceeditor/codemirror/addon/edit/trailingspace.js",
"./sourceeditor/codemirror/keymap/emacs.js",
"./sourceeditor/codemirror/keymap/vim.js",
"./sourceeditor/codemirror/keymap/sublime.js",
"./sourceeditor/codemirror/addon/fold/foldcode.js",
"./sourceeditor/codemirror/addon/fold/brace-fold.js",
"./sourceeditor/codemirror/addon/fold/comment-fold.js",
"./sourceeditor/codemirror/addon/fold/xml-fold.js",
"./sourceeditor/codemirror/addon/fold/foldgutter.js",
"./sourceeditor/codemirror/lib/codemirror.js",
],
output: {
filename: "./sourceeditor/codemirror/codemirror.bundle.js",
libraryTarget: "var",
library: "CodeMirror",
},
}];