Working Directory

Project Path

Custom Protocols

We introduce the custom protocols to ease the path search in main and renderer process.

You can use Editor.url() convert the url to absolute path.

Use seprate html and css file in panel define

We can use Editor.url define the HTML and CSS so that they lives in the separate file:

var Fs = require('fs');
  // css style for panel
  style: Fs.readFileSync(Editor.url('packages://foobar/panel/index.css', 'utf8')),

  // html template for panel
  template: Fs.readFileSync(Editor.url('packages://foobar/panel/index.html', 'utf8')),