You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Paul Roebuck <pa...@comcast.net> on 2012/03/09 14:34:12 UTC
[HELP] Share vendor directory with multi-design documents?
I have a multi-design document setup. I can make this work moving the vendor
directory under each design document. But I don't really want to manage
multiple copies of library javascript code per design document. Please enlighten
me on how this can be shared from the master design.
Simple example for shows using mustache:
Current:
xxx
_design/master
_design/foo
show
this
vendor
couchdb
lib
mustache
_design/bar
show
that
vendor
couchdb
lib
mustache
Desired:
xxx
_design/master
vendor
couchdb
lib
mustache
_design/foo
show
this
_design/bar
show
that
How does one design document "reference" another as such (via require())?
Re: [HELP] Share vendor directory with multi-design documents?
Posted by Paul Roebuck <pa...@comcast.net>.
Yeah, aware that svn:externals could be done. But the example was just
a single file; my actual case has lots of them. Didn't want to go into a
multi-repository scenario for components of a single (and otherwise simple)
couchapp. Is this my only choice?
On Mar 9, 2012, at 7:39 AM, Alexander Shorin wrote:
> Why not just put `vendor` into separate repository and make it as
> subrepo[1] for others? Otherwise, afaik, there is no way to link ddocs
> without direct access via HTTP API.
>
> [1] http://mercurial.selenic.com/wiki/Subrepository
>
>
> --
> ,,,^..^,,,
>
>
>
> On Fri, Mar 9, 2012 at 5:34 PM, Paul Roebuck <pa...@comcast.net> wrote:
>> I have a multi-design document setup. I can make this work moving the vendor
>> directory under each design document. But I don't really want to manage
>> multiple copies of library javascript code per design document. Please enlighten
>> me on how this can be shared from the master design.
>>
>> Simple example for shows using mustache:
>>
>> Current:
>> xxx
>> _design/master
>> _design/foo
>> show
>> this
>> vendor
>> couchdb
>> lib
>> mustache
>> _design/bar
>> show
>> that
>> vendor
>> couchdb
>> lib
>> mustache
>>
>>
>> Desired:
>> xxx
>> _design/master
>> vendor
>> couchdb
>> lib
>> mustache
>> _design/foo
>> show
>> this
>> _design/bar
>> show
>> that
>>
>>
>> How does one design document "reference" another as such (via require())?
>>
Re: [HELP] Share vendor directory with multi-design documents?
Posted by Alexander Shorin <kx...@gmail.com>.
Why not just put `vendor` into separate repository and make it as
subrepo[1] for others? Otherwise, afaik, there is no way to link ddocs
without direct access via HTTP API.
[1] http://mercurial.selenic.com/wiki/Subrepository
--
,,,^..^,,,
On Fri, Mar 9, 2012 at 5:34 PM, Paul Roebuck <pa...@comcast.net> wrote:
> I have a multi-design document setup. I can make this work moving the vendor
> directory under each design document. But I don't really want to manage
> multiple copies of library javascript code per design document. Please enlighten
> me on how this can be shared from the master design.
>
> Simple example for shows using mustache:
>
> Current:
> xxx
> _design/master
> _design/foo
> show
> this
> vendor
> couchdb
> lib
> mustache
> _design/bar
> show
> that
> vendor
> couchdb
> lib
> mustache
>
>
> Desired:
> xxx
> _design/master
> vendor
> couchdb
> lib
> mustache
> _design/foo
> show
> this
> _design/bar
> show
> that
>
>
> How does one design document "reference" another as such (via require())?
>
Re: [HELP] Share vendor directory with multi-design documents?
Posted by Benoit Chesneau <bc...@gmail.com>.
On Fri, Mar 9, 2012 at 5:34 AM, Paul Roebuck <pa...@comcast.net> wrote:
> I have a multi-design document setup. I can make this work moving the vendor
> directory under each design document. But I don't really want to manage
> multiple copies of library javascript code per design document. Please enlighten
> me on how this can be shared from the master design.
>
> Simple example for shows using mustache:
>
> Current:
> xxx
> _design/master
> _design/foo
> show
> this
> vendor
> couchdb
> lib
> mustache
> _design/bar
> show
> that
> vendor
> couchdb
> lib
> mustache
>
>
> Desired:
> xxx
> _design/master
> vendor
> couchdb
> lib
> mustache
> _design/foo
> show
> this
> _design/bar
> show
> that
>
>
> How does one design document "reference" another as such (via require())?
>
`ln -s` should work on the filesystem . There is no possibility
include libs from other docs at the server level for now.
- benoît