"composition initiated by an end user" 是什么意思?
What does "composition initiated by an end user" mean?
docs on composition 声明如下:
In Yeoman, composability can be initiated in two ways:
- A generator can decide to compose itself with other generator (e.g., generator-backbone uses generator-mocha).
- An end user may also initiate the composition (e.g., Simon wants to generate a Backbone project with SASS and Rails).
是否有人有关于第二种方法的解释和示例,即最终用户如何启动组合?我理解 1. 到目前为止,当我编写一个生成器时,我可以 composeWith()
另一个生成器来重用已经提供的功能。
2. 对我来说听起来好像我作为生成器的用户也有机会将它与其他东西组合起来,但如果我解释,我找不到任何指标这项权利及其实现方式。
更新:
通过查看代码,我可以找到关于该主题的唯一参考 is here。文档字符串提到以下内容:
* @param {string} [settings.local] Path to a locally stored generator
* @param {String} [settings.link="weak"] If "strong", the composition will occured
* even when the composition is initialized by
* the end user
但是,如果我没记错的话,函数体既没有调用 settings.link
也没有传递 settings
对象,所以我不确定这是否真的在做某事。
更新 添加为 question/issue Github
https://github.com/yeoman/generator/issues/867
此功能的状态已在 github issue 中阐明。
This is still only a far planned feature.
我会检查这个是否为正确答案,这样问题就不会显示为未回答。每当出现这样的功能时,请随时发表评论,以便我进行更新。
docs on composition 声明如下:
In Yeoman, composability can be initiated in two ways:
- A generator can decide to compose itself with other generator (e.g., generator-backbone uses generator-mocha).
- An end user may also initiate the composition (e.g., Simon wants to generate a Backbone project with SASS and Rails).
是否有人有关于第二种方法的解释和示例,即最终用户如何启动组合?我理解 1. 到目前为止,当我编写一个生成器时,我可以 composeWith()
另一个生成器来重用已经提供的功能。
2. 对我来说听起来好像我作为生成器的用户也有机会将它与其他东西组合起来,但如果我解释,我找不到任何指标这项权利及其实现方式。
更新:
通过查看代码,我可以找到关于该主题的唯一参考 is here。文档字符串提到以下内容:
* @param {string} [settings.local] Path to a locally stored generator
* @param {String} [settings.link="weak"] If "strong", the composition will occured
* even when the composition is initialized by
* the end user
但是,如果我没记错的话,函数体既没有调用 settings.link
也没有传递 settings
对象,所以我不确定这是否真的在做某事。
更新 添加为 question/issue Github
https://github.com/yeoman/generator/issues/867
此功能的状态已在 github issue 中阐明。
This is still only a far planned feature.
我会检查这个是否为正确答案,这样问题就不会显示为未回答。每当出现这样的功能时,请随时发表评论,以便我进行更新。