소스 검색

make it easier to skim past node 0.4 instructions

Ben Atkin 13 년 전
부모
커밋
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 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,
 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
 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
 
 ### Synchronous vs Asynchronous