Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "Move PathUtils to Brackets core code"
  • Loading branch information
zaggino committed Sep 26, 2015
1 parent 784952a commit 14ad0cf
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 1,047 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -1,6 +1,9 @@
[submodule "src/thirdparty/CodeMirror"]
path = src/thirdparty/CodeMirror
url = https://github.com/adobe/CodeMirror2.git
[submodule "src/thirdparty/path-utils"]
path = src/thirdparty/path-utils
url = https://github.com/jblas/path-utils.git
[submodule "src/thirdparty/mustache"]
path = src/thirdparty/mustache
url = https://github.com/janl/mustache.js.git
Expand Down
1 change: 1 addition & 0 deletions .jshintrc
Expand Up @@ -62,6 +62,7 @@
"define": false,
"brackets": false,
"$": false,
"PathUtils": false,
"window": false,
"navigator": false,
"Mustache": false
Expand Down
1 change: 1 addition & 0 deletions Gruntfile.js
Expand Up @@ -275,6 +275,7 @@ module.exports = function (grunt) {
'src/thirdparty/CodeMirror/addon/edit/closetag.js',
'src/thirdparty/CodeMirror/addon/selection/active-line.js',
'src/thirdparty/mustache/mustache.js',
'src/thirdparty/path-utils/path-utils.min',
'src/thirdparty/less-2.5.1.min.js'
],
helpers : [
Expand Down
7 changes: 4 additions & 3 deletions src/LiveDevelopment/Agents/CSSAgent.js
Expand Up @@ -23,7 +23,7 @@


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */
/*global define, $ */
/*global define, $, PathUtils */

/**
* CSSAgent keeps track of loaded style sheets and allows reloading them
Expand All @@ -35,11 +35,12 @@
define(function CSSAgent(require, exports, module) {
"use strict";

require("thirdparty/path-utils/path-utils.min");

var _ = require("thirdparty/lodash");

var Inspector = require("LiveDevelopment/Inspector/Inspector"),
EventDispatcher = require("utils/EventDispatcher"),
PathUtils = require("utils/PathUtils");
EventDispatcher = require("utils/EventDispatcher");

/**
* Stylesheet details
Expand Down
13 changes: 1 addition & 12 deletions src/brackets.js
Expand Up @@ -39,6 +39,7 @@ define(function (require, exports, module) {
"use strict";

// Load dependent non-module scripts
require("thirdparty/path-utils/path-utils.min");
require("widgets/bootstrap-dropdown");
require("widgets/bootstrap-modal");
require("widgets/bootstrap-twipsy-mod");
Expand Down Expand Up @@ -114,18 +115,6 @@ define(function (require, exports, module) {
}
});

// DEPRECATED: In future we want to remove the global CodeMirror, but for now we
// expose our required CodeMirror globally so as to avoid breaking extensions in the
// interim.
var PathUtils = require("utils/PathUtils");

Object.defineProperty(window, "PathUtils", {
get: function () {
DeprecationWarning.deprecationWarning('Use brackets.getModule("utils/PathUtils") instead of global PathUtils.', true);
return PathUtils;
}
});

// Load modules that self-register and just need to get included in the main project
require("command/DefaultMenus");
require("document/ChangedDocumentTracker");
Expand Down
3 changes: 1 addition & 2 deletions src/extensibility/Package.js
Expand Up @@ -24,7 +24,7 @@

/*jslint vars: true, plusplus: true, devel: true, browser: true, nomen: true, regexp: true,
indent: 4, maxerr: 50 */
/*global define, $, brackets */
/*global define, $, brackets, PathUtils */

/**
* Functions for working with extension packages
Expand All @@ -39,7 +39,6 @@ define(function (require, exports, module) {
Strings = require("strings"),
ExtensionLoader = require("utils/ExtensionLoader"),
NodeConnection = require("utils/NodeConnection"),
PathUtils = require("utils/PathUtils"),
PreferencesManager = require("preferences/PreferencesManager");

PreferencesManager.definePreference("proxy", "string", undefined, {
Expand Down
3 changes: 1 addition & 2 deletions src/extensions/default/QuickView/main.js
Expand Up @@ -22,7 +22,7 @@
*/

/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */
/*global define, brackets, $, window */
/*global define, brackets, $, window, PathUtils */

define(function (require, exports, module) {
"use strict";
Expand All @@ -39,7 +39,6 @@ define(function (require, exports, module) {
PreferencesManager = brackets.getModule("preferences/PreferencesManager"),
LanguageManager = brackets.getModule("language/LanguageManager"),
Strings = brackets.getModule("strings"),
PathUtils = brackets.getModule("utils/PathUtils"),
ViewUtils = brackets.getModule("utils/ViewUtils"),
TokenUtils = brackets.getModule("utils/TokenUtils");

Expand Down
5 changes: 2 additions & 3 deletions src/extensions/default/UrlCodeHints/main.js
Expand Up @@ -21,7 +21,7 @@
*/

/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */
/*global define, brackets, $ */
/*global define, brackets, $, window */


define(function (require, exports, module) {
Expand All @@ -36,7 +36,6 @@ define(function (require, exports, module) {
HTMLUtils = brackets.getModule("language/HTMLUtils"),
PreferencesManager = brackets.getModule("preferences/PreferencesManager"),
ProjectManager = brackets.getModule("project/ProjectManager"),
PathUtils = brackets.getModule("utils/PathUtils"),
StringUtils = brackets.getModule("utils/StringUtils"),
Strings = brackets.getModule("strings"),
Data = require("text!data.json"),
Expand Down Expand Up @@ -81,7 +80,7 @@ define(function (require, exports, module) {
docDir = FileUtils.getDirectoryPath(doc.file.fullPath);

// get relative path from query string
queryUrl = PathUtils.parseUrl(query.queryStr);
queryUrl = window.PathUtils.parseUrl(query.queryStr);
if (queryUrl) {
queryDir = queryUrl.directory;
}
Expand Down
5 changes: 3 additions & 2 deletions src/preferences/PreferencesDialogs.js
Expand Up @@ -23,18 +23,19 @@


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define, Mustache */
/*global define, PathUtils, Mustache */

/**
* PreferencesDialogs
*
*/
define(function (require, exports, module) {
"use strict";

require("thirdparty/path-utils/path-utils.min");

var Dialogs = require("widgets/Dialogs"),
ProjectManager = require("project/ProjectManager"),
PathUtils = require("utils/PathUtils"),
StringUtils = require("utils/StringUtils"),
Strings = require("strings"),
SettingsDialogTemplate = require("text!htmlContent/project-settings-dialog.html");
Expand Down
1 change: 1 addition & 0 deletions src/thirdparty/path-utils
Submodule path-utils added at 08dba4
3 changes: 1 addition & 2 deletions src/utils/ExtensionUtils.js
Expand Up @@ -23,7 +23,7 @@


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define, $, brackets, less */
/*global define, $, brackets, less, PathUtils */

/**
* ExtensionUtils defines utility methods for implementing extensions.
Expand All @@ -32,7 +32,6 @@ define(function (require, exports, module) {
"use strict";

var Async = require("utils/Async"),
PathUtils = require("utils/PathUtils"),
FileSystem = require("filesystem/FileSystem"),
FileUtils = require("file/FileUtils");

Expand Down

0 comments on commit 14ad0cf

Please sign in to comment.