cfpb / generator-cf

Yeoman generator for Capital Framework
http://cfpb.github.io/capital-framework/getting-started/
Creative Commons Zero v1.0 Universal
9 stars 13 forks source link

Fix requesting of CF components #115

Closed contolini closed 8 years ago

contolini commented 8 years ago

Removals

ascott1 commented 8 years ago

I'm still having the issue of components not populating the list, though looking at the code this seems like it should fix this problem.

What I've done:

I also unlinked the directory, cleared the npm cache, and ran npm link again just to make sure there wasn't some funkiness there.

@contolini am I testing this PR correctly?

contolini commented 8 years ago

@ascott1 Hmmm, that's weird. It's possible npm link isn't working for some reason. Try editing the opening log statement and see if your edits appear when you run yo cf.

ascott1 commented 8 years ago

@contolini I can edit the prompts view the updates when running the generator, so npm link is definitely working. I updated to the most recent version of 4.2 and I'm only prompted to install "Type-testing," but all of the components seem to install. The same is true in 5.6

jimmynotjim commented 8 years ago

You need to run npm link generator-cf in your project dir you want the generator to run in.

Next, in some other location, npm link package-name will create a symlink from the local node_modules folder to the global symlink.

https://docs.npmjs.com/cli/link

contolini commented 8 years ago

@ascott1 See if that fixes it for you but my understanding is that npm linking in the project directory isn't necessary because generators are installed globally (not locally).

jimmynotjim commented 8 years ago

:+1:

ascott1 commented 8 years ago

Let's merge. I think we've determined that the issue I'm having is unique to my environment and I'm hopeful that installing from npm will be the fix (or if not, we can make an additional fix in a future pull request or I can document what the issue was for me locally)