Electron Apps'About This App' Window for
- Create 'About This App' window from given parameters
- Icon path
- Copy right
- App name and Versions
- Gather package information from package.json
- Automatically detect package.json
- Adjust window size to its contents automatically
- Optional close button
- CSS customizability
You can install this module via npm.
$ npm install about-window
Only one function is exported as default. Please see TypeScript type definition. The function can be called from both main process and renderer process.
icon_path property is required, others are optional.
I recommend to specify as below to extract information from package.json as much as possible.
Path to package.json is also automatically detected if possible.
string value is passed to the first parameter, it is passed to
icon_path. So following is a shorthand of above code:
You can check an example app to know how to use this package.
$ git clone https://github.com/rhysd/about-window.git$ cd about-window/example$ npm install$ npm start# Or for debug$ npm run debug
Parameter's properties of
||Path to icon file of the application. The path is passed to
||Path to directory which contains package.json. If not specified, it will try to detect a path to package.json. If also failed, it gives up and show less information in 'About This App' window. Optional||string|
||URL to bug report page. If not specified, 'bugs' entry in package.json is used. Optional||string|
||Copyright notice shown in window. If not specified, it is replaced with license description generated by 'license' entry of package.json. Optional||string|
||URL of application's web page. If not specified, 'homepage' entry of package.json is used instead. Optional||string|
||Description of the application. If not specified, 'description' entry of package.json is used instead. Optional||string|
||License of the application. If not specified, 'license' entry of package.json is used instead. This property is used when
||Options of 'About This App' window. It is merged into default options. Optional||BrowserWindow options object|
||Path(s) to user-defined CSS file. It will be inserted to DOM of the window. Optional||(array of) string|
||Adjust the window size to its content not to show scroll bar. Optional||boolean|
||For debug purpose, Chrome DevTools will start when the window is opened. Optional||boolean|
||Text for a bug report link. Optional||string|
||Name of the application Optional||string|
||If this is a valid string, a close button with this string be displayed. Optional||string|
||Directory path which contains
Note: If you set
true, please ensure that contents don't contain any untrusted external input
in order to avoid XSS. Be careful.