From 498be1eedc662a8a6927c7b2ca2bbfbfeea059b7 Mon Sep 17 00:00:00 2001 From: ficristo Date: Sat, 22 Aug 2015 14:09:52 +0200 Subject: [PATCH] Fix for 3296: add deprecation warning for global Mustache --- .jshintrc | 3 +-- src/brackets.js | 16 ++++++++++++++-- src/dependencies.js | 2 +- src/editor/CodeHintList.js | 5 +++-- src/editor/ImageViewer.js | 5 +++-- src/extensibility/ExtensionManagerDialog.js | 3 ++- src/extensibility/ExtensionManagerView.js | 5 +++-- src/extensibility/InstallExtensionDialog.js | 5 +++-- src/extensions/default/DebugCommands/main.js | 3 ++- .../default/HealthData/HealthDataPopup.js | 3 ++- .../default/HealthData/HealthDataPreview.js | 3 ++- .../default/InlineColorEditor/ColorEditor.js | 3 ++- .../BezierCurveEditor.js | 5 +++-- .../InlineTimingFunctionEditor/StepEditor.js | 5 +++-- .../default/InlineTimingFunctionEditor/main.js | 3 ++- src/extensions/default/RecentProjects/main.js | 3 ++- .../default/WebPlatformDocs/InlineDocsViewer.js | 5 +++-- .../samples/BracketsConfigCentral/main.js | 3 ++- .../samples/LocalizationExample/main.js | 5 +++-- src/help/HelpCommandHandlers.js | 5 +++-- src/index.html | 1 - src/language/CodeInspection.js | 7 ++++--- src/preferences/PreferencesDialogs.js | 5 +++-- src/project/WorkingSetView.js | 5 +++-- src/search/FileFilters.js | 3 ++- src/search/FindBar.js | 3 ++- src/search/SearchResultsView.js | 3 ++- src/utils/UpdateNotification.js | 5 +++-- src/view/Pane.js | 3 ++- src/view/ThemeSettings.js | 3 ++- src/widgets/Dialogs.js | 5 +++-- src/widgets/StatusBar.js | 5 +++-- test/SpecRunner.html | 1 - 33 files changed, 88 insertions(+), 51 deletions(-) diff --git a/.jshintrc b/.jshintrc index 7916402f071..e88f2130dc2 100644 --- a/.jshintrc +++ b/.jshintrc @@ -64,7 +64,6 @@ "$": false, "PathUtils": false, "window": false, - "navigator": false, - "Mustache": false + "navigator": false } } diff --git a/src/brackets.js b/src/brackets.js index ba1f9aa4d0f..7d9a23e2a11 100644 --- a/src/brackets.js +++ b/src/brackets.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, brackets: true, $, window, navigator, Mustache, jQuery */ +/*global define, brackets: true, $, window, navigator, jQuery */ // TODO: (issue #264) break out the definition of brackets into a separate module from the application controller logic @@ -114,7 +114,19 @@ define(function (require, exports, module) { return CodeMirror; } }); - + + // DEPRECATED: In future we want to remove the global Mustache, but for now we + // expose our required Mustache globally so as to avoid breaking extensions in the + // interim. + var Mustache = require("thirdparty/mustache/mustache"); + + Object.defineProperty(window, "Mustache", { + get: function () { + DeprecationWarning.deprecationWarning('Use brackets.getModule("thirdparty/mustache/mustache") instead of global Mustache.', true); + return Mustache; + } + }); + // Load modules that self-register and just need to get included in the main project require("command/DefaultMenus"); require("document/ChangedDocumentTracker"); diff --git a/src/dependencies.js b/src/dependencies.js index a6d4565667b..18e3e556b09 100644 --- a/src/dependencies.js +++ b/src/dependencies.js @@ -31,7 +31,7 @@ window.setTimeout(function () { "use strict"; var key, missingDeps = ""; - var deps = { "Mustache": window.Mustache, "jQuery": window.$, "RequireJS": window.require }; + var deps = { "jQuery": window.$, "RequireJS": window.require }; for (key in deps) { if (deps.hasOwnProperty(key) && !deps[key]) { diff --git a/src/editor/CodeHintList.js b/src/editor/CodeHintList.js index 7912b9145b2..0e6862df4c7 100644 --- a/src/editor/CodeHintList.js +++ b/src/editor/CodeHintList.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, $, window, Mustache */ +/*global define, $, window */ define(function (require, exports, module) { "use strict"; @@ -34,7 +34,8 @@ define(function (require, exports, module) { StringUtils = require("utils/StringUtils"), ValidationUtils = require("utils/ValidationUtils"), ViewUtils = require("utils/ViewUtils"), - PopUpManager = require("widgets/PopUpManager"); + PopUpManager = require("widgets/PopUpManager"), + Mustache = require("thirdparty/mustache/mustache"); var CodeHintListHTML = require("text!htmlContent/code-hint-list.html"); diff --git a/src/editor/ImageViewer.js b/src/editor/ImageViewer.js index 6ddcd3c632e..19154b66b0a 100644 --- a/src/editor/ImageViewer.js +++ b/src/editor/ImageViewer.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, $, window, Mustache */ +/*global define, $, window */ define(function (require, exports, module) { "use strict"; @@ -36,7 +36,8 @@ define(function (require, exports, module) { StringUtils = require("utils/StringUtils"), FileSystem = require("filesystem/FileSystem"), FileUtils = require("file/FileUtils"), - _ = require("thirdparty/lodash"); + _ = require("thirdparty/lodash"), + Mustache = require("thirdparty/mustache/mustache"); var _viewers = {}; diff --git a/src/extensibility/ExtensionManagerDialog.js b/src/extensibility/ExtensionManagerDialog.js index af1430bb9f2..9cb2ad96be4 100644 --- a/src/extensibility/ExtensionManagerDialog.js +++ b/src/extensibility/ExtensionManagerDialog.js @@ -22,12 +22,13 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global brackets, define, $, Mustache */ +/*global brackets, define, $ */ define(function (require, exports, module) { "use strict"; var _ = require("thirdparty/lodash"), + Mustache = require("thirdparty/mustache/mustache"), Dialogs = require("widgets/Dialogs"), DefaultDialogs = require("widgets/DefaultDialogs"), FileSystem = require("filesystem/FileSystem"), diff --git a/src/extensibility/ExtensionManagerView.js b/src/extensibility/ExtensionManagerView.js index 00640258845..7415e8a5580 100644 --- a/src/extensibility/ExtensionManagerView.js +++ b/src/extensibility/ExtensionManagerView.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50, regexp: true */ -/*global define, $, brackets, Mustache */ +/*global define, $, brackets */ /*unittests: ExtensionManager*/ define(function (require, exports, module) { @@ -35,7 +35,8 @@ define(function (require, exports, module) { registry_utils = require("extensibility/registry_utils"), InstallExtensionDialog = require("extensibility/InstallExtensionDialog"), LocalizationUtils = require("utils/LocalizationUtils"), - itemTemplate = require("text!htmlContent/extension-manager-view-item.html"); + itemTemplate = require("text!htmlContent/extension-manager-view-item.html"), + Mustache = require("thirdparty/mustache/mustache"); /** * Creates a view enabling the user to install and manage extensions. Must be initialized diff --git a/src/extensibility/InstallExtensionDialog.js b/src/extensibility/InstallExtensionDialog.js index d9b4f0f7e24..11c4330776b 100644 --- a/src/extensibility/InstallExtensionDialog.js +++ b/src/extensibility/InstallExtensionDialog.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, window, $, brackets, Mustache, document */ +/*global define, window, $, brackets, document */ /*unittests: Install Extension Dialog*/ define(function (require, exports, module) { @@ -36,7 +36,8 @@ define(function (require, exports, module) { KeyEvent = require("utils/KeyEvent"), Package = require("extensibility/Package"), NativeApp = require("utils/NativeApp"), - InstallDialogTemplate = require("text!htmlContent/install-extension-dialog.html"); + InstallDialogTemplate = require("text!htmlContent/install-extension-dialog.html"), + Mustache = require("thirdparty/mustache/mustache"); var STATE_CLOSED = 0, STATE_START = 1, diff --git a/src/extensions/default/DebugCommands/main.js b/src/extensions/default/DebugCommands/main.js index 6813564ee05..e11a7aac4b6 100644 --- a/src/extensions/default/DebugCommands/main.js +++ b/src/extensions/default/DebugCommands/main.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50, regexp: true */ -/*global define, $, brackets, window, Mustache*/ +/*global define, $, brackets, window*/ define(function (require, exports, module) { "use strict"; @@ -44,6 +44,7 @@ define(function (require, exports, module) { MainViewManager = brackets.getModule("view/MainViewManager"), WorkingSetView = brackets.getModule("project/WorkingSetView"), ExtensionManager = brackets.getModule("extensibility/ExtensionManager"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"), ErrorNotification = require("ErrorNotification"), NodeDebugUtils = require("NodeDebugUtils"), PerfDialogTemplate = require("text!htmlContent/perf-dialog.html"), diff --git a/src/extensions/default/HealthData/HealthDataPopup.js b/src/extensions/default/HealthData/HealthDataPopup.js index ad680ce5a00..f82829bfa1e 100644 --- a/src/extensions/default/HealthData/HealthDataPopup.js +++ b/src/extensions/default/HealthData/HealthDataPopup.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global brackets, define, Mustache, $*/ +/*global brackets, define, $*/ define(function (require, exports, module) { @@ -33,6 +33,7 @@ define(function (require, exports, module) { var MainViewManager = brackets.getModule("view/MainViewManager"), Dialogs = brackets.getModule("widgets/Dialogs"), Strings = brackets.getModule("strings"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"), HealthDataNotificationHtml = require("text!htmlContent/healthdata-popup.html"); function closeCallout() { diff --git a/src/extensions/default/HealthData/HealthDataPreview.js b/src/extensions/default/HealthData/HealthDataPreview.js index b34579d94bb..974e9a8cdb2 100644 --- a/src/extensions/default/HealthData/HealthDataPreview.js +++ b/src/extensions/default/HealthData/HealthDataPreview.js @@ -22,12 +22,13 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, Mustache, brackets, $ */ +/*global define, brackets, $ */ define(function (require, exports, module) { "use strict"; var _ = brackets.getModule("thirdparty/lodash"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"), PreferencesManager = brackets.getModule("preferences/PreferencesManager"), Strings = brackets.getModule("strings"), Dialogs = brackets.getModule("widgets/Dialogs"), diff --git a/src/extensions/default/InlineColorEditor/ColorEditor.js b/src/extensions/default/InlineColorEditor/ColorEditor.js index 007799cf5a4..b353ebe17e2 100644 --- a/src/extensions/default/InlineColorEditor/ColorEditor.js +++ b/src/extensions/default/InlineColorEditor/ColorEditor.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, nomen: true, regexp: true, maxerr: 50 */ -/*global define, brackets, $, window, Mustache */ +/*global define, brackets, $, window */ define(function (require, exports, module) { "use strict"; @@ -31,6 +31,7 @@ define(function (require, exports, module) { PreferencesManager = brackets.getModule("preferences/PreferencesManager"), StringUtils = brackets.getModule("utils/StringUtils"), Strings = brackets.getModule("strings"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"), tinycolor = require("thirdparty/tinycolor-min"); /** Mustache template that forms the bare DOM structure of the UI */ diff --git a/src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js b/src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js index 532eaac66a9..c211468b368 100644 --- a/src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js +++ b/src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js @@ -22,13 +22,14 @@ */ /*jslint vars: true, plusplus: true, nomen: true, regexp: true, maxerr: 50 */ -/*global define, brackets, $, window, Mustache */ +/*global define, brackets, $, window */ define(function (require, exports, module) { "use strict"; var KeyEvent = brackets.getModule("utils/KeyEvent"), - Strings = brackets.getModule("strings"); + Strings = brackets.getModule("strings"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"); var TimingFunctionUtils = require("TimingFunctionUtils"); diff --git a/src/extensions/default/InlineTimingFunctionEditor/StepEditor.js b/src/extensions/default/InlineTimingFunctionEditor/StepEditor.js index 8a21766223a..86048ffe9f6 100644 --- a/src/extensions/default/InlineTimingFunctionEditor/StepEditor.js +++ b/src/extensions/default/InlineTimingFunctionEditor/StepEditor.js @@ -22,13 +22,14 @@ */ /*jslint vars: true, plusplus: true, nomen: true, regexp: true, maxerr: 50 */ -/*global define, brackets, $, window, Mustache */ +/*global define, brackets, $, window */ define(function (require, exports, module) { "use strict"; var KeyEvent = brackets.getModule("utils/KeyEvent"), - Strings = brackets.getModule("strings"); + Strings = brackets.getModule("strings"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"); var TimingFunctionUtils = require("TimingFunctionUtils"); diff --git a/src/extensions/default/InlineTimingFunctionEditor/main.js b/src/extensions/default/InlineTimingFunctionEditor/main.js index 2ed79471921..1bb5e88455e 100644 --- a/src/extensions/default/InlineTimingFunctionEditor/main.js +++ b/src/extensions/default/InlineTimingFunctionEditor/main.js @@ -41,7 +41,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ -/*global define, brackets, $, Mustache */ +/*global define, brackets, $ */ define(function (require, exports, module) { "use strict"; @@ -50,6 +50,7 @@ define(function (require, exports, module) { var EditorManager = brackets.getModule("editor/EditorManager"), ExtensionUtils = brackets.getModule("utils/ExtensionUtils"), Strings = brackets.getModule("strings"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"), InlineTimingFunctionEditor = require("InlineTimingFunctionEditor").InlineTimingFunctionEditor, TimingFunctionUtils = require("TimingFunctionUtils"), diff --git a/src/extensions/default/RecentProjects/main.js b/src/extensions/default/RecentProjects/main.js index ded53f40266..2c8023e3913 100644 --- a/src/extensions/default/RecentProjects/main.js +++ b/src/extensions/default/RecentProjects/main.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ -/*global define, brackets, window, $, Mustache */ +/*global define, brackets, window, $ */ define(function (require, exports, module) { "use strict"; @@ -43,6 +43,7 @@ define(function (require, exports, module) { FileUtils = brackets.getModule("file/FileUtils"), PopUpManager = brackets.getModule("widgets/PopUpManager"), Strings = brackets.getModule("strings"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"), ProjectsMenuTemplate = require("text!htmlContent/projects-menu.html"); var KeyboardPrefs = JSON.parse(require("text!keyboard.json")); diff --git a/src/extensions/default/WebPlatformDocs/InlineDocsViewer.js b/src/extensions/default/WebPlatformDocs/InlineDocsViewer.js index 151700e7e0d..f197865e59f 100644 --- a/src/extensions/default/WebPlatformDocs/InlineDocsViewer.js +++ b/src/extensions/default/WebPlatformDocs/InlineDocsViewer.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, brackets, $, window, Mustache */ +/*global define, brackets, $, window */ /** * Inline widget to display WebPlatformDocs JSON data nicely formatted @@ -36,7 +36,8 @@ define(function (require, exports, module) { ExtensionUtils = brackets.getModule("utils/ExtensionUtils"), InlineWidget = brackets.getModule("editor/InlineWidget").InlineWidget, KeyEvent = brackets.getModule("utils/KeyEvent"), - Strings = brackets.getModule("strings"); + Strings = brackets.getModule("strings"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"); // Load template var inlineEditorTemplate = require("text!InlineDocsViewer.html"); diff --git a/src/extensions/samples/BracketsConfigCentral/main.js b/src/extensions/samples/BracketsConfigCentral/main.js index aa77f6a3a76..54e1a9da2ee 100644 --- a/src/extensions/samples/BracketsConfigCentral/main.js +++ b/src/extensions/samples/BracketsConfigCentral/main.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ -/*global define, brackets, $, Mustache */ +/*global define, brackets, $ */ define(function (require, exports, module) { "use strict"; @@ -32,6 +32,7 @@ define(function (require, exports, module) { ExtensionUtils = brackets.getModule("utils/ExtensionUtils"), DocumentManager = brackets.getModule("document/DocumentManager"), MainViewFactory = brackets.getModule("view/MainViewFactory"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"), ConfigViewContent = require("text!htmlContent/Config.html"); /* our module object */ diff --git a/src/extensions/samples/LocalizationExample/main.js b/src/extensions/samples/LocalizationExample/main.js index 43137db6641..9452b880160 100644 --- a/src/extensions/samples/LocalizationExample/main.js +++ b/src/extensions/samples/LocalizationExample/main.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, brackets, require, Mustache */ +/*global define, brackets, require */ require.config({ @@ -40,7 +40,8 @@ define(function (require, exports, module) { // Brackets modules var CommandManager = brackets.getModule("command/CommandManager"), Menus = brackets.getModule("command/Menus"), - Dialogs = brackets.getModule("widgets/Dialogs"); + Dialogs = brackets.getModule("widgets/Dialogs"), + Mustache = brackets.getModule("thirdparty/mustache/mustache"); // Load an html fragment using the require text plugin. Mustache will later // be used to localize some of the text diff --git a/src/help/HelpCommandHandlers.js b/src/help/HelpCommandHandlers.js index 28a38629efb..f8dd164dbb6 100644 --- a/src/help/HelpCommandHandlers.js +++ b/src/help/HelpCommandHandlers.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, $, brackets, window, Mustache */ +/*global define, $, brackets, window */ define(function (require, exports, module) { "use strict"; @@ -39,7 +39,8 @@ define(function (require, exports, module) { StringUtils = require("utils/StringUtils"), UpdateNotification = require("utils/UpdateNotification"), AboutDialogTemplate = require("text!htmlContent/about-dialog.html"), - ContributorsTemplate = require("text!htmlContent/contributors-list.html"); + ContributorsTemplate = require("text!htmlContent/contributors-list.html"), + Mustache = require("thirdparty/mustache/mustache"); // make sure the global brackets variable is loaded require("utils/Global"); diff --git a/src/index.html b/src/index.html index d89a3ab85cf..0fc897df98c 100644 --- a/src/index.html +++ b/src/index.html @@ -47,7 +47,6 @@ - diff --git a/src/language/CodeInspection.js b/src/language/CodeInspection.js index 72b36a62fc3..c6ddc4ebf2a 100644 --- a/src/language/CodeInspection.js +++ b/src/language/CodeInspection.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4 */ -/*global define, $, Mustache, brackets */ +/*global define, $, brackets */ /** * Manages linters and other code inspections on a per-language basis. Provides a UI and status indicator for @@ -58,8 +58,9 @@ define(function (require, exports, module) { StatusBar = require("widgets/StatusBar"), Async = require("utils/Async"), PanelTemplate = require("text!htmlContent/problems-panel.html"), - ResultsTemplate = require("text!htmlContent/problems-panel-table.html"); - + ResultsTemplate = require("text!htmlContent/problems-panel-table.html"), + Mustache = require("thirdparty/mustache/mustache"); + var INDICATOR_ID = "status-inspection"; /** Values for problem's 'type' property */ diff --git a/src/preferences/PreferencesDialogs.js b/src/preferences/PreferencesDialogs.js index 2a9b3705da8..6efa0672fd9 100644 --- a/src/preferences/PreferencesDialogs.js +++ b/src/preferences/PreferencesDialogs.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, PathUtils, Mustache */ +/*global define, PathUtils */ /** * PreferencesDialogs @@ -38,7 +38,8 @@ define(function (require, exports, module) { ProjectManager = require("project/ProjectManager"), StringUtils = require("utils/StringUtils"), Strings = require("strings"), - SettingsDialogTemplate = require("text!htmlContent/project-settings-dialog.html"); + SettingsDialogTemplate = require("text!htmlContent/project-settings-dialog.html"), + Mustache = require("thirdparty/mustache/mustache"); /** * Validate that text string is a valid base url which should map to a server folder diff --git a/src/project/WorkingSetView.js b/src/project/WorkingSetView.js index 17e8c1e1ea3..2c39d82fc29 100644 --- a/src/project/WorkingSetView.js +++ b/src/project/WorkingSetView.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, $, window, brackets, Mustache */ +/*global define, $, window, brackets */ /** * WorkingSetView generates the UI for the list of the files user is editing based on the model provided by EditorManager. @@ -45,7 +45,8 @@ define(function (require, exports, module) { KeyEvent = require("utils/KeyEvent"), paneListTemplate = require("text!htmlContent/working-set.html"), Strings = require("strings"), - _ = require("thirdparty/lodash"); + _ = require("thirdparty/lodash"), + Mustache = require("thirdparty/mustache/mustache"); /** * Open view dictionary diff --git a/src/search/FileFilters.js b/src/search/FileFilters.js index 6762cfb21fc..95fcb76bad8 100644 --- a/src/search/FileFilters.js +++ b/src/search/FileFilters.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ -/*global define, $, brackets, window, Mustache */ +/*global define, $, brackets, window */ /** * Utilities for managing file-set filters, as used in Find in Files. @@ -32,6 +32,7 @@ define(function (require, exports, module) { "use strict"; var _ = require("thirdparty/lodash"), + Mustache = require("thirdparty/mustache/mustache"), Dialogs = require("widgets/Dialogs"), DropdownButton = require("widgets/DropdownButton").DropdownButton, StringUtils = require("utils/StringUtils"), diff --git a/src/search/FindBar.js b/src/search/FindBar.js index f9f5a833e25..08fd8b566d1 100644 --- a/src/search/FindBar.js +++ b/src/search/FindBar.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ -/*global define, $, Mustache */ +/*global define, $ */ /* * UI for the Find/Replace and Find in Files modal bar. @@ -31,6 +31,7 @@ define(function (require, exports, module) { "use strict"; var _ = require("thirdparty/lodash"), + Mustache = require("thirdparty/mustache/mustache"), EventDispatcher = require("utils/EventDispatcher"), Commands = require("command/Commands"), KeyBindingManager = require("command/KeyBindingManager"), diff --git a/src/search/SearchResultsView.js b/src/search/SearchResultsView.js index b1b42cdd870..468f0689e2c 100644 --- a/src/search/SearchResultsView.js +++ b/src/search/SearchResultsView.js @@ -21,7 +21,7 @@ * */ -/*global define, $, window, Mustache */ +/*global define, $, window */ /* * Panel showing search results for a Find/Replace in Files operation. @@ -43,6 +43,7 @@ define(function (require, exports, module) { Strings = require("strings"), HealthLogger = require("utils/HealthLogger"), _ = require("thirdparty/lodash"), + Mustache = require("thirdparty/mustache/mustache"), searchPanelTemplate = require("text!htmlContent/search-panel.html"), searchResultsTemplate = require("text!htmlContent/search-results.html"), diff --git a/src/utils/UpdateNotification.js b/src/utils/UpdateNotification.js index ecfc3d17175..c765e588d39 100644 --- a/src/utils/UpdateNotification.js +++ b/src/utils/UpdateNotification.js @@ -22,7 +22,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ -/*global define, $, brackets, window, Mustache */ +/*global define, $, brackets, window */ /** * Utilities functions for displaying update notifications @@ -38,7 +38,8 @@ define(function (require, exports, module) { NativeApp = require("utils/NativeApp"), Strings = require("strings"), UpdateDialogTemplate = require("text!htmlContent/update-dialog.html"), - UpdateListTemplate = require("text!htmlContent/update-list.html"); + UpdateListTemplate = require("text!htmlContent/update-list.html"), + Mustache = require("thirdparty/mustache/mustache"); // make sure the global brackets variable is loaded require("utils/Global"); diff --git a/src/view/Pane.js b/src/view/Pane.js index 3422cd295b6..36c7710c2eb 100644 --- a/src/view/Pane.js +++ b/src/view/Pane.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, $, Mustache */ +/*global define, $ */ /** * Pane objects host views of files, editors, etc... Clients cannot access @@ -156,6 +156,7 @@ define(function (require, exports, module) { "use strict"; var _ = require("thirdparty/lodash"), + Mustache = require("thirdparty/mustache/mustache"), EventDispatcher = require("utils/EventDispatcher"), FileSystem = require("filesystem/FileSystem"), InMemoryFile = require("document/InMemoryFile"), diff --git a/src/view/ThemeSettings.js b/src/view/ThemeSettings.js index 4061eb7ee04..528c3894f7c 100644 --- a/src/view/ThemeSettings.js +++ b/src/view/ThemeSettings.js @@ -22,12 +22,13 @@ */ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global $, define, Mustache */ +/*global $, define */ define(function (require, exports, module) { "use strict"; var _ = require("thirdparty/lodash"), + Mustache = require("thirdparty/mustache/mustache"), Dialogs = require("widgets/Dialogs"), Strings = require("strings"), ViewCommandHandlers = require("view/ViewCommandHandlers"), diff --git a/src/widgets/Dialogs.js b/src/widgets/Dialogs.js index c67b94b50ab..0d88ea74c10 100644 --- a/src/widgets/Dialogs.js +++ b/src/widgets/Dialogs.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, $, brackets, window, Mustache */ +/*global define, $, brackets, window */ /** * Utilities for creating and managing standard modal dialogs. @@ -36,7 +36,8 @@ define(function (require, exports, module) { var KeyBindingManager = require("command/KeyBindingManager"), KeyEvent = require("utils/KeyEvent"), Strings = require("strings"), - DialogTemplate = require("text!htmlContent/dialog-template.html"); + DialogTemplate = require("text!htmlContent/dialog-template.html"), + Mustache = require("thirdparty/mustache/mustache"); /** * Dialog Buttons IDs diff --git a/src/widgets/StatusBar.js b/src/widgets/StatusBar.js index 3aaa7f86486..b186d6d3f0a 100644 --- a/src/widgets/StatusBar.js +++ b/src/widgets/StatusBar.js @@ -23,7 +23,7 @@ /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define, $, document, Mustache */ +/*global define, $, document */ /** * A status bar with support for file information and busy and status indicators. This is a semi-generic @@ -37,7 +37,8 @@ define(function (require, exports, module) { var AppInit = require("utils/AppInit"), StatusBarHTML = require("text!widgets/StatusBar.html"), Strings = require("strings"), - WorkspaceManager = require("view/WorkspaceManager"); + WorkspaceManager = require("view/WorkspaceManager"), + Mustache = require("thirdparty/mustache/mustache"); var _init = false; diff --git a/test/SpecRunner.html b/test/SpecRunner.html index 8694b62eabb..31b3a3d9050 100644 --- a/test/SpecRunner.html +++ b/test/SpecRunner.html @@ -36,7 +36,6 @@ -