SamVerschueren / vscode-yo

Yeoman plugin for VS Code
MIT License
87 stars 15 forks source link

Does it work with scoped generators? #48

Closed chakkaradeep closed 7 years ago

chakkaradeep commented 7 years ago

Hi there,

The SharePoint Yeoman Generator to scaffold web part projects is currently into a npm scope, which means, I will have to run the yo as:

yo @microsoft/sharepoint

Does the yo extension support this? When I use the extension in VS code, it just shows sharepoint as the generator and not @microsoft/sharepoint. The next step of showing sub generators also succeeds. But then once I select the default app sub-generator, it throws the following error:

You don't seem to have a generator with the name "sharepoint:app" installed.

The generator as such when used in the command line works without any issues.

Any help much appreciated.

Thanks, Chaks

SamVerschueren commented 7 years ago

Good point, didn't know it was possible. I will have a closer look when I find some time.

chakkaradeep commented 7 years ago

@SamVerschueren Do you have any updates on this? Thanks!

SamVerschueren commented 7 years ago

PR #49 should resolve this. I hope to merge it in the coming days. Feel free to check out the PR and try it yourself to see if it works. Feedback is much appreciated!

chakkaradeep commented 7 years ago

Do you have instructions on how to test the extension locally? I tried two things:

I cloned the PR source repo and started debugging. But that results in errors.

I also tried copying the folder into .vscode/extensions (in my mac). This also doesn't work as VS Code says yo command not found.

SamVerschueren commented 7 years ago

I tested it and it works. BUT, there is a line in generators/solution/index.js of the @microsoft/sharepoint generator

const process = require('process');

This makes this extension fail because process already exists (globally). Could you send a PR internally to remove that as that is not used?

chakkaradeep commented 7 years ago

@SamVerschueren Thanks! Have forwarded this to my dev team. Let me work with them to see what is going on.

If you can update your ReadMe on steps to test/deploy this extension locally, then it would be very helpful for us to validate as well.

SamVerschueren commented 7 years ago

@chakkaradeep To test the extension, clone the repository, install the dependencies (npm install), open the project in VS Code and in the debug section, just click run.

SamVerschueren commented 7 years ago

Released in 0.9.3. Thanks to @zuoez02 !