specifying which directory in the repo to use as the library

19 views
Skip to first unread message

Yehonatan Daniv

unread,
Mar 6, 2013, 4:41:39 PM3/6/13
to vol...@googlegroups.com
What I want is that when someone installs my library they'll only get the /src directory as the installed module and renamed to my library's name.
I thought that that is what the volo.baseDir option does but still doesn't work for me.
What I get is the entire repo.

If it helps, this is my repo.

Thanks!
~Y

James Burke

unread,
Mar 10, 2013, 11:24:50 PM3/10/13
to vol...@googlegroups.com
volo.baseDir is to specify where dependencies should be installed in
the project when `volo add` is used, not for specifying what to
extract.

You can use a volofile with an 'onAdd' hook in it. The onAdd hook is
called whenever your library is added as a dependency.

Example from the tests:
https://github.com/volojs/volo/tree/master/tests/commands/add/support/addable

So if you place a similar volofile in the root of your repo, it will
get called when `volo add` fetches the code, and you can have it move
up the src directory to the root of your directory, and clean up any
files, including deleting the volofile with the 'onAdd' hook.

James

Yehonatan Daniv

unread,
Mar 12, 2013, 4:51:51 AM3/12/13
to vol...@googlegroups.com
Brilliant, thanks!

~Y
Reply all
Reply to author
Forward
0 new messages