volojs / volo

Create front end projects from templates, add dependencies, and automate the resulting projects
https://volojs.github.io/
Other
1.41k stars 99 forks source link

Library to support baseDir #126

Closed guybedford closed 11 years ago

guybedford commented 11 years ago

I was just looking at how I would go about installing the ACE editor with Volo.

Basically, the entire subfolder, 'lib/ace' within the repo should be downloaded, but nothing else is necessary.

If there was a config option, say baseDir, the package.json could set baseDir: 'lib/ace'. This could either directly download the folder (just like the url property points to a file), or it could even imply running any directory checks, downloads and cleaning on that folder, based on the same package.json file. The main property in package.json points directly to this directory as well, so another option would be if the main property is a directory to allow this to imply the directory download.

Just some ideas on how to get this working for the repo. Any others welcome.

jrburke commented 11 years ago

There is # support for referencing a directory or file within a project:

volo add ace#lib/ace

I think that addresses the concern, but if not, we can reopen as needed.

guybedford commented 11 years ago

Perfect, that works great. It would be good to document this a bit more clearly as it is incredibly useful. Perhaps include the 'path/to/folder' as a variation as well in the documentation for Volo add.

jrburke commented 11 years ago

Good suggestion, reopening as a doc task for add.