在CouchDB中使用require()或//!json,!代码?

ajs*_*sie 4 couchdb node.js

CouchDB权威指南中,作者说你可以使用:

// !json templates.edit
// !json blog
// !code vendor/couchapp/path.js
// !code vendor/couchapp/template.js
Run Code Online (Sandbox Code Playgroud)

但是为什么在使用require()时可以使用这些宏?

有时我想使用宏吗?

Dom*_*nes 6

这是CommonJS模块引入CouchDB之前的一个特性.这些宏现在已经过时了.

  • 嗯......我们如何使用require()包含html模板? (2认同)