{
"repo": "pear-electron",
"timestamp": "2026-01-16T23:56:12.528Z",
"entryPoint": "index.js",
"exports": {
"packageJson": {
"main": "index.js"
}
},
"api": {
"file": "index.js",
"exports": [
{
"type": "default",
"name": "Pear"
}
],
"classes": [],
"functions": []
},
"readme": {
"content": "# pear-electron\n\n> Pear User-Interface Library for Electron\n\n## Installation <a name=\"installation\"></a>\n\n```sh\nnpm install pear-electron\n```\n\n## Usage\n\nEnsure the `package.json` `pear` configuration object contains a `pre` field pointing to `pear-electron/pre`.\n\n```js\n{\n \"pear\": {\n \"pre\": \"pear-electron/pre\"\n }\n}\n```\n\nInstantiate a `pear-electron` runtime instance from a Pear Application's entrypoint JavaScript file:\n\n```js\nimport Runtime from 'pear-electron'\nimport Bridge from 'pear-bridge'\n\nconst runtime = new Runtime()\n\nconst bridge = new Bridge()\nawait bridge.ready()\n\nconst pipe = runtime.start({ bridge })\nPear.teardown(() => pipe.end())\n```\n\nCall `runtime.start` to open the UI.\n\n> NOTE: naming the import `Runtime` instead of `PearElectron` is intentional, for two reasons. The `pear-electron` import resolves to a runtime start library or a User Interface library depending on environment and using `Runtime` and `ui` as assigned names means switching out `pear-electron` with an",
"sections": [
"intro",
"installation <a name=\"installation\"></a>",
"usage",
"application configuration <a name=\"application-configuration\"></a>",
"initialization api <a name=\"initialization-api\"></a>",
"user-interface api <a name=\"user-interface-api\"></a>",
"graphical user interface options <a name=\"pear-gui\"></a>",
"web apis <a name=\"web-apis\"></a>",
"development <a name=\"development\"></a>"
],
"hasApi": true,
"hasExamples": true,
"exampleCount": 16,
"examples": [
"## Usage\n\nEnsure the `package.json` `pear` configuration object contains a `pre` field pointing to `pear-electron/pre`.",
"Instantiate a `pear-electron` runtime instance from a Pear Application's entrypoint JavaScript file:",
"Call `runtime.start` to open the UI.\n\n> NOTE: naming the import `Runtime` instead of `PearElectron` is intentional, for two reasons. The `pear-electron` import resolves to a runtime start library or a User Interface library depending on environment and using `Runtime` and `ui` as assigned names means switching out `pear-electron` with an equivalent alternative only involves changing the two `pear-electron` import specifiers.\n\nGiven an `index.html` containing `<script src=\"./app.js\"></script>` in `app.js` import `pear-electron` User Interface API:"
]
},
"patterns": [
"binary-encoding",
"streaming"
]
}