create-webextension icon indicating copy to clipboard operation
create-webextension copied to clipboard

feat: pass argument to main function

Open saintsebastian opened this issue 8 years ago • 5 comments

fixes #3

A very small change, we could expand it further if need arises

saintsebastian avatar Jul 24 '17 16:07 saintsebastian

:+1: thanks @saintsebastian

rpl avatar Jul 24 '17 17:07 rpl

I am contemplating how to make using the package as a library easier, maybe wrapping current code in bin/create-webextension in a function with optional argument?

saintsebastian avatar Jul 25 '17 17:07 saintsebastian

@rpl i moved console.log to bin/create-webextenion so main is 'quiet', does that work as intended? i don't know whether adding parameters should be done here or when i'll write test for main

saintsebastian avatar Jul 27 '17 19:07 saintsebastian

@rpl Thanks for the review, i tried to add the behavior you were talking about. In case of onlyInstancesOf i chose to log the trace and exit with code 1 to avoid Unhandled Promise Rejection. I also added dummy test for onlyInstancesOf to start with.

saintsebastian avatar Aug 07 '17 11:08 saintsebastian

hey @rpl! I added some tests and tried to address the thing in your review. Some tests are a bit clunky, so i would appreciate your opinion.

saintsebastian avatar Aug 14 '17 18:08 saintsebastian