Skip to content
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

feat(args): improve api dx #488

Merged
merged 6 commits into from
May 18, 2022
Merged

feat(args): improve api dx #488

merged 6 commits into from
May 18, 2022

Conversation

CxRes
Copy link
Contributor

@CxRes CxRes commented Mar 30, 2018

As discussed in #482. Please accept this as well as some of the other very sensible pending PRs.

Breaking Change: The default platform is set as the current OS (using the prexisting OS detection mechanism). This prevents additional binaries from being downloaded when in run-mode apart from being a more sensible default.

Fixed: Arguments to be passed to NW.js instance must be specified after -- flag (cli) or options.argv (js API). There were corner cases where this was not happening.

Modified: --enable-logging flag has been removed as a default argument to NW.js spawn. (User can pass this on their own volition or we can use a --verbose flag to do it for her. Even now, --silent is not linked to --enable-logging.

The default platform is set as the current OS. This prevents additional binaries from being downloaded in run-mode apart from being a more sensible default.

Arguments to be passed to NW.js instance must be specified after `--` flag (cli) or `options.argv` (js API).

--enable-logging flag has been removed as a default argument to NW.js spawn
Fixed some punctuation in the README file.
README.md Outdated
version: '0.14.6'
platforms: ['osx64', 'win32', 'win64', 'linux32', 'linux64'],
version: 'latest',
argv: '-- <args>' // see nwjs docs for possible <args>
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this supposed to be argv: [/*'<nwjs_arg>', ...*/] (array vs string)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good Catch!!!!

+ Fixed API example - options.argv is an Array.
+ Defined Separate types for API and CLI for Array/csv
README.md Outdated
version: '0.14.6'
platforms: ['osx64', 'win32', 'win64', 'linux32', 'linux64'],
version: 'latest',
argv: '[<nwjs_arg>, ... ]' // see nwjs docs for possible <nwjs_arg> values
Copy link
Contributor

Choose a reason for hiding this comment

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

Still a string, should be argv: ['<nwjs_arg>', ...] (the quotes are around the <nwjs_arg> not the entire array)

README.md Outdated
@@ -88,7 +94,7 @@ The path to your node webkit app. It supports [simple-glob](https://github.com/j


#### options.version
Type: `String`
Type: `Array``String`
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh Crap!!!

Removed Array as version type and fix quotes in API example.
@CxRes
Copy link
Contributor Author

CxRes commented Apr 3, 2018

Why don't you ask @adam-lynch to make you a maintainer????

@zaygraveyard
Copy link
Contributor

Why don't you ask @adam-lynch to make you a maintainer????

With great power comes great responsibility.
But I can certainly help.
If @adam-lynch has very little time to review PRs and/or merge them, I'll accept this power and help out.

@CxRes
Copy link
Contributor Author

CxRes commented Apr 3, 2018

ROFL! You are maintaining a lib not saving planet earth....

But @zaygraveyard you have an eye for details... Which is important!!!!!

@zaygraveyard
Copy link
Contributor

You are maintaining a lib not saving planet earth....

I would argue that maintaining a lib can be as important as saving the planet if you recall the left-pad crisis 😝

But @zaygraveyard you have an eye for details... Which is important!!!!!

Thank you 😄

I guess now we wait for @adam-lynch

@kessler
Copy link
Contributor

kessler commented Dec 18, 2018

@CxRes hi there friend, I'm going over the PRs and issues. Could you please comment if this PR is relevant?

@CxRes
Copy link
Contributor Author

CxRes commented Dec 19, 2018

I think the PR is rather sensible for the reasons I explained in the first post in this thread as well as #482. @zaygraveyard has also reviewed this and broadly agrees afaik.

@kessler
Copy link
Contributor

kessler commented Dec 19, 2018

@CxRes Thanks for your quick response, I agree with all the points raised in #482 and I want to merge your PR. Is it possible for your to fix the conflicts? I know it's asking much since a lot of time has gone by, so it's perfectly understandable if you'll say no.

@CxRes
Copy link
Contributor Author

CxRes commented Dec 21, 2018

@kessler You'll have to give me some time. As it was so long ago, I do not even remember now the changes I had made. In particular, I am not sure about the last of three conflicts. I'll get back to you once I get a chance to have a look again!

@kessler
Copy link
Contributor

kessler commented Dec 23, 2018

@CxRes I don't have to give you anything that is inherently yours! :-) I'll wait patiently.

@CxRes
Copy link
Contributor Author

CxRes commented Dec 24, 2018

@kessler Done... You can pull now!!!

@ayushmanchhabra ayushmanchhabra self-requested a review May 18, 2022 04:06
@ayushmanchhabra ayushmanchhabra changed the title Run mode fixes fix: run mode May 18, 2022
@ayushmanchhabra ayushmanchhabra changed the title fix: run mode feat(args): improve args May 18, 2022
@ayushmanchhabra ayushmanchhabra changed the title feat(args): improve args feat(args): improve api args dx May 18, 2022
@ayushmanchhabra ayushmanchhabra changed the title feat(args): improve api args dx feat(args): improve api dx May 18, 2022
@ayushmanchhabra ayushmanchhabra merged commit b54e81d into nwutils:master May 18, 2022
@CxRes
Copy link
Contributor Author

CxRes commented May 18, 2022

@ayushmXn Are you going to be a permanent maintainer in the foreseeable future?

@ayushmanchhabra
Copy link
Collaborator

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants