Streamline how we build CodeMirror in dist/ so things get bundled, part of #634 (#636)

* Streamline how we build CodeMirror in dist/ so things get bundled, part of #634

* Add back copy.thirdparty task, but just for less.min.js

* Add back src/thirdparty/CodeMirror copy task on install
This commit is contained in:
David Humphrey 2017-03-14 17:08:32 -04:00 коммит произвёл GitHub
Родитель 265532221a
Коммит 4426127e49
2 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -76,7 +76,6 @@ module.exports = function (grunt) {
/* static files */
'xorigin.js',
'dependencies.js',
'thirdparty/requirejs/require.js',
/* extensions and CodeMirror modes */
'!extensions/default/*/unittests.js',
@ -86,12 +85,6 @@ module.exports = function (grunt) {
'!extensions/**/node_modules/**/*.js',
'!extensions/**/test/**/*.js',
'!**/unittest-files/**',
'thirdparty/CodeMirror/addon/{,*/}*.js',
'thirdparty/CodeMirror/keymap/{,*/}*.js',
'thirdparty/CodeMirror/lib/{,*/}*.js',
'thirdparty/CodeMirror/mode/{,*/}*.js',
'thirdparty/CodeMirror/theme/{,*/}*.js',
'thirdparty/slowparse/slowparse.js',
'thirdparty/i18n/*.js',
'thirdparty/text/*.js'
],
@ -122,10 +115,7 @@ module.exports = function (grunt) {
'nls/{,*/}*.js',
'xorigin.js',
'dependencies.js',
'thirdparty/requirejs/require.js',
'thirdparty/slowparse/locale/*',
'thirdparty/github-markdown.css',
'LiveDevelopment/launch.html',
'hosted.*',
// XXXBramble: we don't use src/config.json like Brackets does,
// but it needs to exist in dist/ so copy it
@ -158,13 +148,7 @@ module.exports = function (grunt) {
'!extensions/extra/*/thirdparty/**/*.htm{,l}',
'!extensions/dev/*',
'!extensions/samples/**/*',
'thirdparty/CodeMirror/addon/{,*/}*',
'thirdparty/CodeMirror/keymap/{,*/}*',
'thirdparty/CodeMirror/lib/{,*/}*',
'thirdparty/CodeMirror/mode/{,*/}*',
'!thirdparty/CodeMirror/mode/**/*.html',
'!thirdparty/CodeMirror/**/*test.js',
'thirdparty/CodeMirror/theme/{,*/}*',
'thirdparty/CodeMirror/lib/codemirror.css',
'thirdparty/i18n/*.js',
'thirdparty/text/*.js'
]

Просмотреть файл

@ -57,6 +57,22 @@ define(function (require, exports, module) {
require("thirdparty/CodeMirror/addon/selection/mark-selection");
require("thirdparty/CodeMirror/keymap/sublime");
// XXXBramble: because we include code folding by default, bundle those addons
// so they get bundled with our dist/thirdparty.js file.
// See src/extensions/default/CodeFolding/main.js
require("thirdparty/CodeMirror/addon/fold/brace-fold");
require("thirdparty/CodeMirror/addon/fold/comment-fold");
require("thirdparty/CodeMirror/addon/fold/markdown-fold");
// XXXBramble: also preload the modes we'll need later, and have them get bundled.
// See src/language/LanguageManager.js and src/language/languages.json
require("thirdparty/CodeMirror/mode/meta");
require("thirdparty/CodeMirror/mode/css/css");
require("thirdparty/CodeMirror/mode/htmlmixed/htmlmixed");
require("thirdparty/CodeMirror/mode/javascript/javascript");
require("thirdparty/CodeMirror/mode/jsx/jsx");
require("thirdparty/CodeMirror/mode/xml/xml");
require("thirdparty/CodeMirror/mode/markdown/markdown");
// Load dependent modules
var AppInit = require("utils/AppInit"),
LanguageManager = require("language/LanguageManager"),