Yeoman Generator Next Steps

半腔热情 提交于 2019-12-07 04:54:28

问题


I'm new to creating a Yeoman Generator. I used generator-generator to get me started and I went through the process of creating it, testing, and getting it all buttoned up.

In the tuts for creating a yo generator they seem to leave off where my question is headed.

Question: What next? I've got it all readyL

  • Do I submit it to Yeoman?
  • Simply put it on my Github?
  • How can I get it to where others can start using my shiny new generator?

Thanks for the help / guidance.


回答1:


Found here: http://www.eguneys.com/blog/2014/09/17/lets-build-a-yeoman-generator-2

Publish Your Generator

Finally you can publish your generator. First create an account on npm. Next set your npm author info.

$ npm set init.author.name "Your Name"
$ npm set init.author.email "Your Email"
$ npm set init.author.url "Your Website"

$ npm adduser

Then publish with.

$ npm publish

A note about the package.json format

There is a list of yeoman generators in the official yeoman website. It is automatically pulled from the npm API. To list your generator there you need to add yeoman-generator keyword to your package.json and a repository description on Github.




回答2:


You just need to publish it to npm.

Make sure to add "yeoman-generator" as a keywords in your package.json file so it'll be listed on yeoman.io and by yo when a user search for generators.



来源:https://stackoverflow.com/questions/28847456/yeoman-generator-next-steps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!