All Projects → morganstanley → Desktopjs

morganstanley / Desktopjs

Licence: apache-2.0
desktopJS provides a common API across multiple HTML5 containers. By programming to a common API, applications can target multiple HTML5 containers without change.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Desktopjs

Subspace
Library for Reactive Dapp Development with auto syncing and caching capabilities
Stars: ✭ 57 (-13.64%)
Mutual labels:  frontend
Elementx
⚡️ Functionally create DOM elements and compose them to a tree quickly
Stars: ✭ 62 (-6.06%)
Mutual labels:  frontend
Elm Street
🌳 Crossing the road between Haskell and Elm
Stars: ✭ 65 (-1.52%)
Mutual labels:  frontend
Symphonyelectron
A desktop client for the Symphony Collaboration Platform built using Electron
Stars: ✭ 58 (-12.12%)
Mutual labels:  desktop-app
Electron Angular4 Sqlite3
Sample project to show how to build a desktop app using Electron, Angular 4 and Sqlite3
Stars: ✭ 60 (-9.09%)
Mutual labels:  desktop-app
Fe Problem Collection
前端问题收集和知识经验总结
Stars: ✭ 63 (-4.55%)
Mutual labels:  frontend
Postbird
Open source PostgreSQL GUI client for macOS, Linux and Windows
Stars: ✭ 1,089 (+1550%)
Mutual labels:  desktop-app
Vibe
Get insights into your Spotify listening history 🎶
Stars: ✭ 67 (+1.52%)
Mutual labels:  frontend
Layr
Dramatically simplify full‑stack development
Stars: ✭ 1,111 (+1583.33%)
Mutual labels:  frontend
Omatsuri
PWA with 12 open source frontend focused tools
Stars: ✭ 1,131 (+1613.64%)
Mutual labels:  frontend
Sharebook Frontend
Projeto frontend de código livre para o app Sharebook.
Stars: ✭ 59 (-10.61%)
Mutual labels:  frontend
Aem Core Cif Components
A set of configurations and components to get you started with AEM Commerce development
Stars: ✭ 60 (-9.09%)
Mutual labels:  frontend
Dev Practice
Practice your skills with these ideas.
Stars: ✭ 1,127 (+1607.58%)
Mutual labels:  frontend
Livro Sem Apego
📚 Um site de doação de livros, sem fins lucrativos! o/
Stars: ✭ 58 (-12.12%)
Mutual labels:  frontend
Cynthesize Frontend
Frontend written in Angular 7 and deployed GraphQL for Cynthesize. Development build: https://cynthesize-develop.netlify.com
Stars: ✭ 65 (-1.52%)
Mutual labels:  frontend
Node Javascript Ecommerce
Build ECommece Like Amazona Using Vanilla JS
Stars: ✭ 57 (-13.64%)
Mutual labels:  frontend
Sublime Text Plugins For Frontend Web Development
📝 Collection of plugins for Frontend Web Development
Stars: ✭ 1,127 (+1607.58%)
Mutual labels:  frontend
Alchemy
An open drawing project
Stars: ✭ 63 (-4.55%)
Mutual labels:  desktop-app
Blog
📚 专注Web与算法
Stars: ✭ 1,140 (+1627.27%)
Mutual labels:  frontend
Rust Webapp Template
Template project for Rust web app
Stars: ✭ 64 (-3.03%)
Mutual labels:  frontend

desktopJS

npm version Build Status codecov GitPitch

desktopJS is a common API across multiple HTML5 containers. By programming to a common API, applications can target multiple HTML5 containers without change. Detecting what container in which you are hosted, desktopJS provides shims and polyfills to bridge the common API to the underlying container. The goal is to help applications be container agnostic and provide portability when multiple container deployments are desired.

Usage

The first step is to simply resolve the current container. This enumerates all registered containers (including your own custom container or derived custom implementations) and returns the container implementation that matches.

var container = desktopJS.resolveContainer();
console.log("Container: " + container.hostType);

Interact with the container via a single api instead of having conditional code or applications based on deployment.

container.addTrayIcon({ icon: 'assets/img/application.png', text: 'Example' }, () => {
	console.log("Icon clicked");
});

Building

The library uses gulp and rollup for building. All build dependencies are included as devDependencies and are installed during npm install.

$ npm install

Build the project. This runs static analysis, unit tests and bundles the output with rollup.

$ npm run build && npm test

For those using Visual Studio Code, tasks.json has a build task.

Development

Local Hosting

To run the examples or to manually test scenarios in each container, there is a gulp task providing a local server with live reload. This can be run directly via gulp or through npm.

$ npm start

This is configured to listen at http://localhost:8000 and will reload upon any change to the project build output under /dist or the web example under /examples/web. All of the included examples make use of this example application to showcase the portability of one codebase.

Unit tests

The tests can be run independent of the build.

$ npm test

A task is provided for Visual Studio Code users that can be launched from the command palette via

>Tasks: Run Test Task

or it is recommended to define a custom keyboard binding.

{
    "key": "ctrl+shift+t",
    "command": "workbench.action.tasks.test"
}

Examples

Examples showcasing usage of desktopJS for various containers and scenarios can be found under the examples directory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].