Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using require() or // !json, !code in CouchDB?

In the CouchDB Definitive Guide the author says you could use:

// !json templates.edit
// !json blog
// !code vendor/couchapp/path.js
// !code vendor/couchapp/template.js

But why use those macros when you can use require()?

Are there occasions I want to use the macros instead?

like image 853
ajsie Avatar asked Jan 21 '23 23:01

ajsie


1 Answers

This was a feature from before CommonJS modules were introduced into CouchDB. These macros are pretty much obsolete now.

like image 199
Dominic Barnes Avatar answered Jan 28 '23 08:01

Dominic Barnes