Commit 7a146963 by Andy Armstrong

Fix optimizing of draggabilly and json2

parent 222bdd98
...@@ -17,7 +17,6 @@ require.config({ ...@@ -17,7 +17,6 @@ require.config({
paths: { paths: {
"domReady": "js/vendor/domReady", "domReady": "js/vendor/domReady",
"gettext": "/i18n", "gettext": "/i18n",
"json2": "js/vendor/json2",
"mustache": "js/vendor/mustache", "mustache": "js/vendor/mustache",
"codemirror": "js/vendor/codemirror-compressed", "codemirror": "js/vendor/codemirror-compressed",
"codemirror/stex": "js/vendor/CodeMirror/stex", "codemirror/stex": "js/vendor/CodeMirror/stex",
...@@ -96,9 +95,6 @@ require.config({ ...@@ -96,9 +95,6 @@ require.config({
] ]
}, },
shim: { shim: {
"json2": {
exports: "JSON"
},
"gettext": { "gettext": {
exports: "gettext" exports: "gettext"
}, },
......
...@@ -23,7 +23,6 @@ requirejs.config({ ...@@ -23,7 +23,6 @@ requirejs.config({
"jquery.simulate": "xmodule_js/common_static/js/vendor/jquery.simulate", "jquery.simulate": "xmodule_js/common_static/js/vendor/jquery.simulate",
"datepair": "xmodule_js/common_static/js/vendor/timepicker/datepair", "datepair": "xmodule_js/common_static/js/vendor/timepicker/datepair",
"date": "xmodule_js/common_static/js/vendor/date", "date": "xmodule_js/common_static/js/vendor/date",
"json2": "xmodule_js/common_static/js/vendor/json2",
"moment": "xmodule_js/common_static/js/vendor/moment.min", "moment": "xmodule_js/common_static/js/vendor/moment.min",
"moment-with-locales": "xmodule_js/common_static/js/vendor/moment-with-locales.min", "moment-with-locales": "xmodule_js/common_static/js/vendor/moment-with-locales.min",
"text": "xmodule_js/common_static/js/vendor/requirejs/text", "text": "xmodule_js/common_static/js/vendor/requirejs/text",
...@@ -59,9 +58,6 @@ requirejs.config({ ...@@ -59,9 +58,6 @@ requirejs.config({
"js/spec/test_utils": "js/spec/test_utils", "js/spec/test_utils": "js/spec/test_utils",
} }
shim: { shim: {
"json2": {
exports: "JSON"
},
"gettext": { "gettext": {
exports: "gettext" exports: "gettext"
}, },
......
define(["jquery", "jquery.ui", "underscore", "json2", "gettext", "draggabilly", define(["jquery", "jquery.ui", "underscore", "gettext", "draggabilly",
"js/utils/module", "common/js/components/views/feedback_notification"], "js/utils/module", "common/js/components/views/feedback_notification"],
function ($, ui, _, JSON, gettext, Draggabilly, ModuleUtils, NotificationView) { function ($, ui, _, gettext, Draggabilly, ModuleUtils, NotificationView) {
'use strict'; 'use strict';
var contentDragger = { var contentDragger = {
......
...@@ -59,7 +59,6 @@ lib_paths: ...@@ -59,7 +59,6 @@ lib_paths:
- xmodule_js/common_static/js/vendor/draggabilly.pkgd.js - xmodule_js/common_static/js/vendor/draggabilly.pkgd.js
- xmodule_js/common_static/js/vendor/date.js - xmodule_js/common_static/js/vendor/date.js
- xmodule_js/common_static/js/vendor/domReady.js - xmodule_js/common_static/js/vendor/domReady.js
- xmodule_js/common_static/js/vendor/json2.js
- xmodule_js/common_static/js/vendor/URI.min.js - xmodule_js/common_static/js/vendor/URI.min.js
- xmodule_js/common_static/js/vendor/jquery.smooth-scroll.min.js - xmodule_js/common_static/js/vendor/jquery.smooth-scroll.min.js
- xmodule_js/common_static/coffee/src/jquery.immediateDescendents.js - xmodule_js/common_static/coffee/src/jquery.immediateDescendents.js
......
...@@ -1748,7 +1748,14 @@ return Unidragger; ...@@ -1748,7 +1748,14 @@ return Unidragger;
if ( typeof define == 'function' && define.amd ) { if ( typeof define == 'function' && define.amd ) {
// AMD // AMD
define( [ // Note: fixed by andy-armstrong to include a name for the definition
// so that this works when optimized using r.js. This is only an issue
// in Studio, as the LMS uses a namespaced version of RequireJS so
// this clause isn't reached.
// See http://requirejs.org/docs/errors.html#mismatch
define(
'draggabilly',
[
'classie/classie', 'classie/classie',
'get-style-property/get-style-property', 'get-style-property/get-style-property',
'get-size/get-size', 'get-size/get-size',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment