couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Trivial Update of "JavascriptPatternViewCommonJs" by jpfiset
Date Thu, 02 Dec 2010 04:10:20 GMT
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 ==

Mime
View raw message