Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add custom --config option#163

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
alexcanessa merged 3 commits intogithub-tools:masterfromkyeah:kev-config-opt
May 10, 2018

Conversation

@kyeah
Copy link
Contributor

Closes#152.

Adds a--config option to specify a custom configuration file, e.g.

gren release --config=.custom.grenrc.js

Note that a plain grenrc file can only contain one., so--custom=.custom.grenrc will be parsed incorrectly (see the checkhere). I left it alone for now, but if you have a preference for how it should behave, let me know 👋

@codecov-io
Copy link

codecov-io commentedMay 6, 2018
edited
Loading

Codecov Report

Merging#163 intomaster willdecrease coverage by45.46%.
The diff coverage is100%.

Impacted file tree graph

@@             Coverage Diff             @@##           master     #163       +/-   ##===========================================- Coverage   83.72%   38.26%   -45.47%===========================================  Files           7        7                 Lines         338      345        +7     ===========================================- Hits          283      132      -151- Misses         55      213      +158
Impacted FilesCoverage Δ
lib/_options.js71.42% <ø> (ø)⬆️
lib/src/Program.js82.14% <100%> (ø)⬆️
lib/src/_utils.js100% <100%> (ø)⬆️
lib/src/Gren.js5.28% <0%> (-75.49%)⬇️
lib/src/GitHubInfo.js80.95% <0%> (-4.77%)⬇️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update9ff8e2a...5c19fc7. Read thecomment docs.

if(customFilename){
returnrequireConfig(Path.join(path,customFilename))||{};
}else{
returngetFileTypes()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What do you think about about:

return[].concat(customFilename,getFileTypes()).reduce()||{};

So that, if the user passes a wrong configuration file, gren will still look for existing ones.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Good call! Since the user is passing a specific config filename in, they're expecting the file to exist — do you think it'd be more user-friendly to throw an error here and notify them that the file wasn't found?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Definitely! I think we either check if other configuration files exist or we throw an error - as logging something in red in the console - which is still a good solution for me.

@alexcanessaalexcanessa merged commit56551ae intogithub-tools:masterMay 10, 2018
@alexcanessa
Copy link
Member

@all-contributors please add@kyeah for code

@allcontributors
Copy link
Contributor

@alexcanessa

I've put upa pull request to add@kyeah! 🎉

kyeah reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@alexcanessaalexcanessaalexcanessa approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add configuration-file option

3 participants

@kyeah@codecov-io@alexcanessa

[8]ページ先頭

©2009-2025 Movatter.jp