How does Facebook's local Javascript SDK resolve dependencies?
I downloaded the source code of Facebook's Javascript SDK from github. At the top of each javascript file, there is a header, such as the 开发者_如何学Cfollowing:
/* * @provides fb.content * @requires fb.prelude fb.array */
Are these simply for the sake of the programmer so that (s)he knows which files are required by each file? Or is there a program that processes these comments and adds the proper files so that all required files are available?
Thanks for the help.
Repo link for Facebook's Javascript SDK: https://github.com/facebook/connect-js
Looks like it's just JSDoc documentation to me. So to answer your question, it is for the sake of the programmer, and for anyone who reads the API reference that is generated from the script files.
精彩评论