webview/webview_deno
Fork: 74 Star: 1425 (更新于 2024-10-21 06:29:09)
license: MIT
Language: TypeScript .
🌐 Deno bindings for webview, a tiny library for creating web-based desktop GUIs
最后发布版本: 0.8.0 ( 2024-03-03 23:08:30)
webview_deno
Webview is a tiny cross-platform library to make web-based GUIs for desktop applications.
⚠️ This project is still in development. Expect breaking changes.
Installation
Webview is published to jsr.io and deno.land. The recommended way to use it is to use JSR:
deno add @webview/webview
or without the CLI:
import { Webview } from "jsr:@webview/webview";
Example
import { Webview } from "@webview/webview";
const html = `
<html>
<body>
<h1>Hello from deno v${Deno.version.deno}</h1>
</body>
</html>
`;
const webview = new Webview();
webview.navigate(`data:text/html,${encodeURIComponent(html)}`);
webview.run();
You can run this example directly from the web:
deno run -Ar --unstable https://deno.land/x/webview/examples/local.ts
or in your development environment:
deno run -Ar --unstable examples/local.ts
you can find other examples in the examples/
directory.
Documentation
You can find the official documentation here.
Development
Prerequisites
Linux
-
webkit2gtk (to install using apt:
sudo apt-get install libwebkit2gtk-4.0-dev
)
Building
Make sure to init the webview submodule with:
$ git submodule update --init --recursive
Building on Windows requires admin privileges.
$ deno task build
Running
To run webview_deno without automatically downloading the binaries from
releases you will need to
use the environment variable PLUGIN_URL
and set it to the path where the built
binaries are located. This is usually file://./target/release
.
$ deno task build
$ PLUGIN_URL=./build/
$ deno run --unstable -A examples/local.ts
or
$ deno task run examples/local.ts
or if you have the webview library already built and didn't make any changes to it, you can skip the building step with:
$ deno task run:fast examples/local.ts
Environment variables
-
PLUGIN_URL
- Set a custom library URL. Defaults to the latest release assets on Github. Setting this also disables cache forplug
.
Dependencies
Other
Contribution
Pull request, issues and feedback are very welcome. Code style is formatted with
deno task fmt
, linted with deno task lint
and commit messages are done
following Conventional Commits
spec.
Licence
Copyright 2020-2022, the webview_deno team. All rights reserved. MIT license.
最近版本更新:(数据更新于 2024-10-15 10:25:31)
2024-03-03 23:08:30 0.8.0
2023-07-26 23:11:12 0.7.6
2022-08-29 03:08:15 0.7.4
2022-06-25 22:31:35 0.7.3
2022-06-25 17:23:36 0.7.2
2022-06-25 08:22:21 0.7.0
2022-02-17 18:51:00 0.7.0-pre.1
2022-01-27 07:09:57 0.7.0-pre.0
2021-05-13 09:01:47 0.6.0-pre.0
2021-02-04 02:10:01 0.5.6
主题(topics):
deno, deno-bindings, deno-module, deno-plugin, deno-plugins, deno-webview, gui, hacktoberfest, typescript, webview
webview/webview_deno同语言 TypeScript最近更新仓库
2024-11-05 17:55:23 langgenius/dify
2024-11-05 17:35:52 siyuan-note/siyuan
2024-11-05 16:59:32 laurent22/joplin
2024-11-05 12:39:27 lobehub/lobe-chat
2024-11-05 11:52:31 RSSNext/Follow
2024-11-05 07:18:03 microsoft/genaiscript