ソースを参照

make it easier to skim past node 0.4 instructions

Ben Atkin 12 年 前
コミット
e9855affb6
1 ファイル変更9 行追加7 行削除
  1. 9 7
      README.md

+ 9 - 7
README.md

@@ -22,13 +22,6 @@ Then run `npm install` to get amdefine into your project.
 if (typeof define !== 'function') { var define = require('amdefine')(module) }
 if (typeof define !== 'function') { var define = require('amdefine')(module) }
 ```
 ```
 
 
-If you want to support Node 0.4, then add `require` as the second parameter to amdefine:
-
-```javascript
-//Only if you want Node 0.4. If using 0.5 or later, use the above snippet.
-if (typeof define !== 'function') { var define = require('amdefine')(module, require) }
-```
-
 **Only use these snippets** for loading amdefine. If you preserve the basic structure,
 **Only use these snippets** for loading amdefine. If you preserve the basic structure,
 with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer).
 with the braces, it will be stripped out when using the [RequireJS optimizer](#optimizer).
 
 
@@ -66,6 +59,15 @@ mentioned above, so you can include this snippet for code that runs in the
 browser, but avoid taking the cost of the if() statement once the code is
 browser, but avoid taking the cost of the if() statement once the code is
 optimized for deployment.
 optimized for deployment.
 
 
+## Node 0.4 Support
+
+If you want to support Node 0.4, then add `require` as the second parameter to amdefine:
+
+```javascript
+//Only if you want Node 0.4. If using 0.5 or later, use the above snippet.
+if (typeof define !== 'function') { var define = require('amdefine')(module, require) }
+```
+
 ## Limitations
 ## Limitations
 
 
 ### Synchronous vs Asynchronous
 ### Synchronous vs Asynchronous