skpm / with-webview

Template for skpm using a webview
40 stars 21 forks source link

Building when Sketch is closed makes the plugin not working or Sketch crashing #4

Closed gabrielenosso closed 7 years ago

gabrielenosso commented 7 years ago

If Sketch is closed and I run "npm start", it build the plugin and starts Sketch. The problem is that it shows the plugin window, but the plugin can't work, cause Sketch starts without any "document" instantiated.

So, if you close the plugin window, after 1 second Sketch crashes. If you leave the plugin window open, and you create a new document in Sketch, the plugin doesn't work (cause when it was initialized there was no "document").

mathieudutour commented 7 years ago

you can just use npm run watch if you don't want it to run automatically