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

volo add of directory with a JS 1.8 main fails #144

Closed jrburke closed 11 years ago

jrburke commented 11 years ago

The volo add tries to parse the package.json's main file to check if it has internal dependencies, and decide to keep the whole directory or just extract the main file. However, if the main file has a parse error, or is in a JS version (like JS 1.8) that the token parsing does not understand, it fails.

Test case: volo add micropilot.

gregglind commented 11 years ago

FWIW, I have a ES-1.8 compliant version of esprima, but open this can of worms seems very much Not Worth It.

https://github.com/gregglind/esprima/tree/moz

jrburke commented 11 years ago

Good to know, but I agree. Unless there are other big failings with volo and 1.8 code I would prefer to keep esprima from its origin. For this fix, it should have been in there anyway in case the main module was malformed in some way.

gregglind commented 11 years ago

Did 0.2.9 get pushed to wherever npm knows about it?

jrburke commented 11 years ago

Pushed now, sorry forgot to actually run publish.