blitsen
v0.2.1
Published
Native runtime CLI and types for Blitsen
Maintainers
Readme
Blitsen
Build a native application from static HTML, CSS and JavaScript without Chromium or an operating- system WebView.
Blitsen is pre-alpha and implements a subset of the web platform. Run
blitsen doctorand test every target before distribution.
Install
npm install -D blitsenThe package installs the CLI and the prebuilt runtime for the current Linux, macOS or Windows platform. Installation does not compile Rust.
Run an application
Open a directory containing built index.html:
npx blitsen distOr use a running development server and keep its transforms and hot reload:
npx blitsen http://localhost:5173Blitsen accepts built static output. It does not transpile TypeScript/JSX/framework source or resolve bare npm imports at runtime.
Configure a project
Put the build command and output directory in package.json:
{
"scripts": {
"native": "blitsen build"
},
"blitsen": {
"build": "vite build",
"output": "dist",
"name": "My App"
}
}Then run without a directory:
npx blitsen
npx blitsen doctor dist
npm run nativeThe default build embeds reachable assets in one desktop executable. A directory argument such as
blitsen build dist skips the configured build command.
Use native capabilities
Import native modules through normal package subpaths and feature-detect optional members:
import clipboard from "blitsen/clipboard";
if (clipboard.writeText) {
clipboard.writeText("Hello from Blitsen");
}This release provides modules for application directories/lifecycle, window controls, Linux dialogs, clipboard formats and operating-system readings. TypeScript declarations ship with the package.
Documentation
- Getting started
- Configuration
- Native APIs
- Packaging and distribution
- CLI reference
- Web API support
- Troubleshooting
Run npx blitsen --help for every option. The source repository and issue tracker are at
github.com/krazyjakee/blitsen.
Blitsen is independently built on Blitz. It is not an official DioxusLabs project and is not endorsed by DioxusLabs.
