0

In my package.json file for node-webkit I have: "chromium-args" : "--url="http://www.google.com"" I tried to use use backslashes \"www.google.com\", but webkit seems to not open at all when uses blackslashes. If I leave the blackslashes out, webkit loads the window but produces a JSON syntax error.

package.json file code:

{
  "main": "index.html",
  "name": "nw-demo",
  "description": "demo app of node-webkit",
  "version": "0.1.0",
  "keywords": [ "demo", "node-webkit" ],
  "window": {
    "icon": "link.png",
    "toolbar": true,
    "width": 800,
    "height": 500,
    "position": "mouse",
    "min_width": 400,
    "min_height": 200,
    "max_width": 800,
    "max_height": 600
  },
  "webkit": {
    "plugin": true
  },
  "chromium-args" : "--url=\"http://www.google.com\""
}

What is the correct json syntax to for "chromium-args"?

dottedquad
  • 1,371
  • 6
  • 24
  • 55

2 Answers2

0

for 'url' you might write in in the 'main' field.

For quoting it could be written this way '--key

Roger Wang
  • 1,388
  • 10
  • 8
  • I replaced my main field with the url of a remote website and that worked as expected. I did try that before posting my question, but node-webkit was not working as expected. I think the initial trial and error I was not compressing the files correctly. This time I deleted my app.nw and started from scratch. Now webkit seems to work as expected. – dottedquad May 01 '13 at 01:47
0

Instead of double quotes use single quotes

"chromium-args" : "--url='http://www.google.com'"

Sreejith K
  • 86
  • 4