naviapps / create-nw-react-app

Create NW.js React apps with no build configuration.
MIT License
144 stars 14 forks source link

Question. where to mount the configurations for windows nw.js? #22

Open j-Cis opened 5 years ago

j-Cis commented 5 years ago

Question. where to mount the configurations for windows nw.js?

I apologize for the prosaic nature of my question, but I'm still learning .. (and the Polish proverb says "who asks is not to wander" & "no exist stupid questions, only stupid answers")

in advance - thank you for your support and helpful

ExoMemphiz commented 5 years ago

Having same problem, not sure how to set width and height of the original NW window that is created upon start.

EDIT: Figured it out after a bit of looking around, in your package.json, you need to add a new section, called "window", on the same indentation as name, version, dependencies etc.

Snippet of how mine now looks like this:

... "name": "NW-test", "version": "0.1.0", "window": { "width": 640, "height": 320 }, ...

naviapis commented 5 years ago

NW.js sets from package.json. http://docs.nwjs.io/en/latest/References/Manifest%20Format/

This app is only to provide a minimum nw-react-app, it does not include the basic settings of NW.js.

I will consider whether to include the window setting in the future.

Thanks for comment.