-
Notifications
You must be signed in to change notification settings - Fork 168
Update to avoid using .remote() #26
Comments
We have all of the templates local to the generator for subgenerators, what is everyone's thought? |
If possible I think There is two level built-in solution in Yeoman to update generators AFAIK and keep users up-to-date with released, most recent versions: #1
update:
#2 There is additional benefit of moving to use copy feature instead of fetching from git directly. During generator development that is not possible to work with locally updated content - samples are always fetched from remote upstream master - not from local repository used for development. |
Yes I agree we should stop using Update plugin sounds good as well. |
The implementation for local templates/files can be as simple as: |
@peterblazejewicz have you done this locally and tested? |
@spboyer Yes, this is from my local branch. Can I bring back default Yeoman's testing structure to project? (by default yeoman-generator scaffolds tests for generator projects). I could investigate this. |
.remote() removed and test coverage added for entire repo in latest PR -> #59 |
Migrated issue from ligershark/generator-aspnet#9. See that for full comments.
@shirhatti in the current implementation we are using
.remote()
in index.js to retrieve the template content. What I've noticed is that when calling.remote()
if the git repo exists on the client cache then it will not be refreshed. There is arefresh
parameter on remote(). If we specifytrue
for refresh then the git repo will be cloned each time when the generator is invoked. On my box in order to get rid of yeoman cache I had to removeyo
.Is using
.remote()
the right approach here? I looked at the generator-angular and they include the files directly inside the npm package then use .template() and .copy() to write the files.The code to always update when using remote is below.
cc @jchannon
The text was updated successfully, but these errors were encountered: