Browse Source

Merge pull request #18 from herby/master

Making amdefine self-contained so easily embeddad.
James Burke 10 years ago
parent
commit
a8fe7caf4b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      amdefine.js

+ 2 - 2
amdefine.js

@@ -8,8 +8,6 @@
 /*global module, process */
 'use strict';
 
-var path = require('path');
-
 /**
  * Creates a define for node.
  * @param {Object} module the "module" object that is defined by Node for the
@@ -21,9 +19,11 @@ var path = require('path');
  * module.
  */
 function amdefine(module, require) {
+    'use strict';
     var defineCache = {},
         loaderCache = {},
         alreadyCalled = false,
+        path = require('path'),
         makeRequire, stringRequire;
 
     /**