A minimalist single window/single instance browser, invokable via command line.
This app grew out of the need of a customer to open URLs from a desktop application. But instead of opening every URL in a normal browser and thus opening a new tab/window with every call the customer wanted to have just a simple window which does nothing more than open a new URL (given via command line) in the same window.
SingleInstanceBrowser was developed in pure TypeScript with minimal dependencies using electron-typescript-template and runs on the Electron platform.
Important notice: No special attempts have been made to make this browser secure for web browsing. Both the host window and the loadad pages can use plugins; all other options are set to their default values. See also Electron BrowserWindow and Electron <webview> Tag. Use at your own risk!
The documentation can be found in the README.md of the app itself.
A complete documentation for development can be found at electron-typescript-template (the template used to create this app). The following is only a short synopsis of the most frequent commands you can use.
You only need Node.js to be installed on your machine.
If you want to build Windows releases on the Mac you also need to install Wine with version 1.6 or later. One easy way to install Wine on the Mac is to use Homebrew. Building Mac releases on Windows currently isn't possibe.
After cloning this repository please run
npm install
or the equivalent
npm i
You need to run npm install
only once. It installs the necessary components for the
building tool chain, usually there are no reasons to change this again.
If you want to make changes to the code or any other parts you first have to run
npm run build
This installs all dependencies needed for development
(TypeScript,
Electron,
electron-packager
etc.) and also updates/assembles app resources and copies them to ./out/
. Without
a successful run of npm run build
you won't be able to compile, run or make
distributables of the app.
Compiling the TypeScript source code is done with
npm run compile
So after cloning the repository and a successful single run of
npm install && npm run build && npm run compile
you should be able to start the generated app with
npm start
Command | Description |
---|---|
npm install |
Initial setup, mandatory, run only once. |
npm run build |
Install/update development dependencies; one run after npm install is mandatory. During development: update/assemble all build artifacts (generated code, app resources, Node modules used by the app etc.) and copy to ./out/ . Must be run if any non-code resources (like CSS) were changed. |
npm compile |
Compile and pack the source code for both the main and renderer process to ./out/ . Can be run on any source code changes. |
npm c:main |
Compile and pack only the source code for the Electron main process to ./out/ . Must be run if source code of the main process was changed. |
npm c:renderer |
Like c:main but only for the Electron renderer process. |
npm start |
Start the current state of the app from ./out/ . Requires at least one successful preceding run of both npm run build and npm run compile . |
npm run make |
Create a distributable of the app for the current platform and write it to ./release/ . |
npm run make:all |
Create distributables for all supported platforms and write them to ./release/ . |
npm run clean |
Remove all build artifacts (./out/ and parts of ./build/tmp/ ) but excluding release builds in ./release/ . |
npm run clean:all |
Like npm run clean but including also all release builds in ./release/ . |
npm run watch |
Start file system watchers for everything below ./app/ . Frees you from manually running build and compile commands. Modifying code or resources will trigger the appropriate build commands and keep a npm start -able / npm run make -able application up to date in ./out/ . |
npm run lint |
Check the complete source code with TSLint. |
MIT © idesis GmbH, Rellinghauser Straße 334F, D-45136 Essen