Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] require js style

Just an observation based on our experience with require.js:
----
define(['dojo', 'orion/commands', 'orion/globalCommands', 'orion/textview/keyBinding', 'orion/textview/undoStack'], function(dojo, mCommands, mGlobalCommands, mKeyBinding, mUndoStack) {

var exports = {};
---
Notice that if you name the var here as mEditorCommands:

var mEditorCommands = {};
...
return mEditorCommands;

then when you search through the source for "mEditorCommands" you will hit both the uses and the definition of the object.

jjb




Back to the top