npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@morgan-stanley/composeui-node-launcher

v0.1.0-alpha.4

Published

Package to launch ComposeUI from Node.js

Downloads

21

Readme

@morgan-stanley/composeui-node-launcher

Pre-requisites

For the shell:

Library

The library enables you to dynamically set properties for your window in your javascript code.

function windowOpenExample() {
    const window = new BrowserWindow(
        {
            url: "https://github.com/morganstanley/composeui",
            title: "My Web App",
            width: 1600,
            height: 800
        });

    window.open();
}


windowOpenExample();

Or with loadUrl

function loadUrlExample() {
    const window = new BrowserWindow(
        {
            width: 1600,
            height: 800
        });

    window.loadUrl("https://github.com/morganstanley/composeui");
}

loadUrlExample();

In order to set an icon for your application, set the icon property when creating a new BrowserWindow. The url set for the icon must either be relative to the app url, or an http or https url. If the host part of the icon url is different from the app url, you must set the COMPOSE_ALLOWED_IMAGE_SOURCES environment value to contain the allowed icon host(s). You may separate multiple allowed hosts with semicolons (;).

CLI

The CLI enables you to execute your app with ComposeUI by executing the following command:

composeui myapp.js

Install.js

This script is downloading and extracting the necessary binaries from CDN during npm install. By default it's downloading the binaries from the github tagged releases but the following variables can be overridden by setting an environment variable or including an .npmrc file:

CDN URL: COMPOSEUI_CDN_URL (or npm_config_composeui_cdn_url)

COMPOSEUI_CDN_URL='http://127.0.0.1:8080'

version: COMPOSEUI_VERSION (or npm_config_composeui_version)

COMPOSEUI_VERSION='0.1.0'

skip download: COMPOSEUI_SKIP_DOWNLOAD (or npm_config_composeui_skip_download)

COMPOSEUI_SKIP_DOWNLOAD='true'

location of the binary: COMPOSEUI_BINARY_FILE_PATH (or npm_config_composeui_binary_file_path)

COMPOSEUI_BINARY_FILE_PATH='path\to\binary\ComposeUI-Shell.exe'

Local Development

Developing the CLI

If you're developing the CLI itself you need to execute the following command

npm link

in the ./src/shell/js/composeui-node-launcher/ folder.

Developing the install.js script

If you're developing the install.js script and would like to test if the binaries downloading and extracting as expected you can serve a folder with a name of the version containing a zip with the binaries locally (e.g with http-server), and set that link for the COMPOSEUI_CDN_URL environment variable.

For example:

COMPOSEUI_CDN_URL='http://127.0.0.1:8080'

Working with the locally compiled shell binary:

To achieve this you can set the COMPOSEUI_BINARY_FILE_PATH variable to point to the exe compiled by Visual Studio:

COMPOSEUI_BINARY_FILE_PATH='path\to\your\project\folder\ComposeUI\src\shell\dotnet\Shell\bin\Debug\net6.0-windows\ComposeUI-Shell.exe'