Created
October 14, 2011 12:27
-
-
Save aseemk/1286967 to your computer and use it in GitHub Desktop.
Weird/wrong order of execution when require()-ing things in Node v0.4.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(Date.now() + ' requiring coffee-script...'); | |
require('coffee-script'); | |
console.log(Date.now() + ' requiring streamline...'); | |
require('streamline'); | |
console.log(Date.now() + ' requiring custom...'); | |
require('./custom'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is at the top of the file registered as "main" in package.json | |
console.log(Date.now() + ' coffee-script executing...'); | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is at the top of the file registered as "main" in package.json | |
console.log(Date.now() + ' streamline executing...'); | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log Date.now() + ' custom executing...' | |
# ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1318595095620 requiring coffee-script... | |
1318595095658 requiring streamline... | |
1318595095706 requiring custom... | |
1318595095715 custom executing... | |
1318595095784 coffee-script executing... | |
1318595095824 streamline executing... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment