You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2010/12/02 05:10:20 UTC

[Couchdb Wiki] Trivial Update of "JavascriptPatternViewCommonJs" by jpfiset

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "JavascriptPatternViewCommonJs" page has been changed by jpfiset.
http://wiki.apache.org/couchdb/JavascriptPatternViewCommonJs?action=diff&rev1=2&rev2=3

--------------------------------------------------

  
  Notes:
    1. In a couchApp (an application developed and deployed using CouchApp), the content above would be saved in a file named "vendor/myComp/utils.js". 
-   1. Files uploaded using CouchApp are stripped of their extensions since it would lead to confusion as the dot (period) is the natural Javascript separator. Therefore, the shared code is "known" by CouchApp as "vendor/myComp/utils.js"  while is is referred internally to the design documents as "vendor.myComp.utils".
+   1. Files uploaded using CouchApp are stripped of their extensions since it would lead to confusion as the dot (period) is the natural Javascript separator. Therefore, the shared code is "known" by CouchApp as "vendor/myComp/utils.js"  while it is referred internally to the design documents as "vendor.myComp.utils".
  
  == Inclusion using CommonJs ==
  
@@ -61, +61 @@

  
  Notes:
    1. The 'require' function in CommonJs exposes the 'exports' defined in the library and assigns them to the variable.
-   1. The variable 'utils' can be used to access the definitions from the shared code.
+   1. The variable 'myUtils' can be used to access the definitions from the shared code.
    1. Note that the path uses slashes and that the file extension (if using CouchApp) is omitted. 
  
  == Inclusion using CouchApp directives ==