cloverfield-tools / cloverfield

A next generation JavaScript boilerplate scaffolding tool.
MIT License
142 stars 8 forks source link

Search for packages locally #33

Closed nkbt closed 9 years ago

nkbt commented 9 years ago

At the moment Cloverfield searches for globally installed packages. We need to search for locally installed as well.

ericelliott commented 9 years ago

:+1:

nkbt commented 9 years ago

After some code written and some additional thoughts, I believe for cloverfield we should stick to locally installed modules exclusively. And if necessary install missing scaffolds on-demand [#17].

Technically it would simplify the code a little bit - I would be able to do simple require(package.name) and then run it. Without any additional parsing of package.json.

But what is more important, it would be conceptually more correct - whatever cloverfield is working with is only stored locally, so it does not try to go beyond its own folder.

I will still make a PR with what is done, and we can update it later.

nkbt commented 9 years ago

See #34. It works fine for now, but I would think about removing findGlobal (not 100% sure on that though)

ericelliott commented 9 years ago

:+1: