npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

about-window-edit

v1.6.2

Published

'EDITED, use origional called about-window. About App' window for Electron application

Downloads

7

Readme

'THIS IS EDITED TO TAKE OUT SOME THINGS. About This App' Window for Electron Apps

npm version

This package provides 'About This App' window for Electron applications.

  • [x] Create 'About This App' window from given parameters
    • [x] Icon path
    • [x] Copy right
    • [x] App name and Versions
    • [x] Description
  • [x] Gather package information from package.json
  • [x] Automatically detect package.json
  • [x] Adjust window size to its contents automatically
  • [x] 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.

export default function openAboutWindow(info: {
    icon_path: string;
    package_json_dir?: string;
    bug_report_url?: string;
    copyright?: string;
    homepage?: string;
    description?: string;
    license?: string;
    css_path?: string;
    adjust_window_size?: boolean;
    win_options?: BrowserWindowOptions;
}): BrowserWindow

Only 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.

openAboutWindow({
    icon_path: 'path/to/icon.png'
});

You can check 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

Parameter's properties of openAboutWindow()

| Name | Description | Type | |------|-------------|------| | icon_path | Path to icon file of the application. Required | string | | package_json_dir | 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 | | bug_report_url | URL to bug report page. If not specified, 'bugs' entry in package.json is used. Optional | string | | copyright | Copyright notice shown in window. If not specified, it is replaced with license description generated by 'license' entry of package.json. Optional | string | | homepage | URL of application's web page. If not specified, 'homepage' entry of package.json is used instead. Optional | string | | description | Description of the application. If not specified, 'description' entry of package.json is used instead. Optional | string | | license | License of the application. If not specified, 'license' entry of package.json is used instead. This property is used when copyright is not specified. Optional | string | | win_options | Options of 'About This App' window. It is merged into default options. Optional | BrowserWindow options object | | css_path | Path to user-defined CSS file. It will be inserted to DOM of the window. Optional | string | | adjust_window_size | Adjust the window size to its content not to show scroll bar. Optional | boolean | | open_devtools | For debug purpose, Chrome DevTools will start when the window is opened Optional | boolean | | use_inner_html | If true, set the value with .innerHTML on copyright, license and description Default is false Optional | boolean |

Note: If you set use_inner_html to true, please ensure that they don't contain any untrusted external input in order to avoid XSS. Be careful.

Screen Shots

Linux

Linux screenshot

OS X

OS X screenshot

Windows

Windows screenshot

License

MIT License.