Problems installing my library with volo

20 views
Skip to first unread message

Eugene Lazutkin

unread,
May 20, 2014, 1:37:39 PM5/20/14
to vol...@googlegroups.com
I use volo v0.3.1. When I add my library to a project with volo I am getting a warning:

$ volo add heya/unify heya-unify

The result is wrong: library's main.js file is renamed as heya-unify.js, and placed in www/lib directory, but the rest of files in the library is ignored. Expected: a directory named heya-unify should be created in www/lib, and heya-unify.js should be a thunk file loading files from that directory.

When I specify -amdoff, I have no warning, yet the result is the same:

$ volo add -f -amdoff heya/unify heya-unify
Installed github:heya/unify/0.1.11 at www/lib/heya-unify.js
AMD dependency name: heya-unify

Interesting enough that heya/unify is modelled after uhop/dcl, yet the latter works properly with volo, while the former is installed incorrectly. Just like uhop/dcl, heya/unify has package.json and available with npm. Just like uhop/dcl package.json has no amd nor volo properties in it.

The only difference is that the main module is actually named main.js --- is this a problem? The doc says: "If there is a main module that serves as the entry point into the collection of modules, name it main.js and place it at the top level of the repo". I did precisely that because it is a collection of modules, there is a main module, which serves as an entry point to the main functionality. But somehow auxiliary modules are lost. If this is the culprit, it would be nice to reword the doc to be clearer, and spell out the exact behavior of volo.

Or did I do something wrong on my side? How can I fix it?

Cheers,

Eugene

James Burke

unread,
May 21, 2014, 1:08:07 AM5/21/14
to vol...@googlegroups.com
The difference seems to be that uhop/dcl has a require() in it for a
local module, so volo keeps the whole directory. If there are no
dependencies in the main module, then it is assumed the target is a
single file package, and just saves that file.

This behavior can be overridden though in heya/unify’s package.json by
telling volo the type of directory:
https://github.com/volojs/volo/wiki/Library-best-practices#volotype-

{
“volo”: {
“type”: “directory"
}
}

James
> --
> You received this message because you are subscribed to the Google Groups
> "volojs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to volojs+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Eugene Lazutkin

unread,
May 27, 2014, 7:26:18 PM5/27/14
to vol...@googlegroups.com
Thank you, that helped.

Still "returned status: 301" bothers me --- even with "volo" in package.json it still checks an external repository and barfs on 301. Is 301 supposed to be normal? The only way to install anything properly is to specify -amdoff, which is something to remember for my users. Can it be fixed?

Cheers,

Eugene
Reply all
Reply to author
Forward
0 new messages