-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
* @param {string} fileUrl A cannonical file URL to extract the extension from | ||
*/ | ||
function _getMimeTypeFromFileExtensions( fileUrl ) { | ||
require("thirdparty/path-utils/path-utils.min"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By convention, we're putting all the require() calls at the top of the module. This way you can easily see the dependent modules, and quickly check if a needed module has already been require()'d.
* Does as needed loading and simple dependecy management when loading modes | ||
* @param {string} mimetype A mimetype that matches one of the available modes | ||
*/ | ||
function _loadModeForMimeType( mimetype ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole function can go away and be replaced with the require() calls at the top of the module. There is no benefit to conditional module loading here since require.js always pulls all dependencies out, and loads them all, regardless of whether they are needed or not (see http://requirejs.org/docs/api.html#modulenotes and http://requirejs.org/docs/commonjs.html#intro for details).
This version is required to load and run brackets properly on node-webkit. See requirejs/text#55 for node-specific details. Summary of changes: > rev to 2.0.10 > Merge pull request adobe#61 from AnSavvides/master > Merge pull request adobe#60 from dakota/patch-1 > rev to 2.0.9 > Merge pull request adobe#55 from busykai/master > Fixes adobe#57 xpcshell: windows FileUtils.File does not like / paths > Rev version for 2.0.7 > Fixes adobe#52, handle non-existent files in node > Fixes issue mentioned in comments for requirejs/r.js#221 about Java usage > Merge pull request adobe#49 from fsbdev/patch-1
This is the adds mode switching based off the file extension.