New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compose with generator-travis #176
compose with generator-travis #176
Conversation
054af1d
to
ef0d087
Compare
LGTM! I just want to take a look at the travis generator before actually merging. I'll try to get back to you before the weekend. |
this.composeWith('node:travis', {}, { | ||
local: require.resolve('../travis') | ||
this.composeWith('travis', {}, { | ||
local: require.resolve('generator-travis/generators/app') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change the indentation here please :)
LGTM. Thanks! Although it works for our use case, I think the generator-travis misses a bunch of things. It would be cool if it had options like what node versions to use, if people even want node at all, custom commands, ... Without those things it's useless for a bunch of generators out there. |
I have the same question as @arthurvr here, what is the plan for the future of this generator? |
It is really good question. I spend few days on thinking how to keep balance between single responsibility and extensibility. Initial idea was to have easy way to get travis config with up to date node versions, like I can easily support all the other fields, but I feel like it will blur purpose of this generator. If someone want to have other scripts in travis config, maybe its the job for generator-coveralls or smth. So this generator will only handle node versions and keep already existing fields as before, while other generators will be able to make their job. What do you think? PS. the reason why I add nodejs as default env, because nodejs community is almost the only yeoman consumer. PS 2. This Semver upgrade model seems good enough:
|
Second thought is to support all custom fields, because then everybody still can use up-to-date node versions and just extend travis config. So right now roadmap looks like this: 1. extend travis config 2. support all custom fields. What do you think? |
Delivered with generator-travis 1.1. Will add tests for extend logic as well |
only one problem I found, fields in result travis config is not sorted properly. For example:
Will be:
Is there any way to sorted JSON.stringify? |
Yay, I imlemented sorted Yaml config and added tests. Take a look pls. |
I’m also thinking to add feature of removing old node versions from the list, because whole point is to get "up-to-date" travis config, it will be true by default with possibility to turn off in options or with flag. So what do you think about pull-request? |
@SBoudrias @arthurvr looking for your feedback =) |
IMO, I'd settle on a default config (0.10, 0.12, stable) and allow an option to manually specify versions. I'd be simpler. It's kind of important currently supporting 0.10 to 4.1 because apt-get default is still 0.10, so a lot of people still have it installed. For this CR, I'm okay to merge. But fix the indentation issue and update the readme too as there's references to the travis sub-generator. |
b9cef50
to
c8581b1
Compare
Also I wanted the more clear way to understand how to add or remove versions in the list, so I found nodejs/LTS plan and ended up relevant section in the generator-travis’s readme. generator-travis seems to be finished. What do you think? |
Cool, LGTM. Please squash your commits and we'll merge. |
69ac994
to
8899491
Compare
8899491
to
c26bda8
Compare
done |
…ravis compose with generator-travis
Here it goes! Thanks a ton |
@iamstarkov I understand have dependencies is good thing, but would it be more cleaner if this lands in as Say if someone wants to fiddle with travis generator, will land to the //cc @SBoudrias |
I found
composeWith
feature as awesome one and think that if yeoman community will have smaller generators then, everybody will benefit from it. For example with this pull-request,generator-node
will no longer need to handle travis config on its own. What do you think?