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

launchui-packager

v0.1.1

Published

Package applications using LaunchUI for Windows, Linux and OS X

Downloads

6

Readme

LaunchUI Packager

Package applications using LaunchUI for Windows, Linux and OS X.

NPM module MIT License

Introduction

LaunchUI wraps Node.js with a small executable which automatically runs the application. No console window is opened and in case of a fatal error, it is reported using a message box.

LaunchUI Packager provides a command line utility and an API for creating packages based on LaunchUI for Windows, Linux and OS X.

Installation

Install LaunchUI Packager locally to use it in your build scripts:

npm install --save-dev launchui-packager

Install LaunchUI Packager globally to use it from command line:

npm install --global launchui-packager

Usage

You can run launchui-packager from the command line:

launchui-packager <name> <version> <entry> [options...]

Arguments

The following arguments are required:

<name>

Name of the application to package.

<version>

Version of the application to package.

<entry>

Path of the entry script of the application. It will be copied to app/main.js inside the package.

Options

In addition, the following options can be specified:

--out <path>

Path of the output directory where the package is created. The default value is the current directory.

--platform <platform>

The platform of the package. The default value is process.platform. The supported values are win32, darwin (OS X) and linux.

--arch <arch>

The architecture of the package. The default value is process.arch. The supported values are x64 (on all platforms) and ia32 (on win32/linux only).

--overwrite

When specified, the already existing package directory and/or ZIP file will be replaced. By default, existing files are not replaced.

--pack <format>

When specified, the package directory is packed using the given format. Currently the only supported format is zip. By default, the package directory is not packed.

--launchui-version <version>

Version of the LaunchUI package to download. The default value is the currently installed version of the launchui NPM module.

--launchui-cache <path>

Path of the LaunchUI cache location where packages are downloaded. The default location is ~/.launchui.

--company <company>

The company name. Maps to the CompanyName metadata property on Windows.

--copyright <copyright>

The copyright of the application. Maps to the LegalCopyright metadata property on Windows and NSHumanReadableCopyright on OS X.

--identifier <identifier>

The bundle identifier of the application. Maps to CFBundleIdentifier on OS X.

--category <category>

The category type of the application. Maps to LSApplicationCategoryType on OS X.

--icon <path>

Path of the application icon. It must be an .ico file on Windows and .icns on OS X.

--license <path>

Path of the license file to include in the root directory of the package.

--dir <path>

Path of the directory containing additional files to include in the app subdirectory of the package.

--files <pattern,...>

A pattern, or a comma separated list of patterns, which specifies the files to include, for example *.js. The default value is **, which means that the entire contents of dir is included in the package. Refer to the Glob documentation for more information about supported patterns.

Output

The name of the package directory is <name>-v<version>-<platform>-<arch>, for example MyApp-v1.0.0-win32-ia32. The name of the ZIP file is the same, with the .zip extension. The location of the generated packages can be changed using the --out option.

The LaunchUI executable is automatically renamed to the specified application name, for example MyApp.exe on Windows, MyApp.app on OS X and MyApp on Linux.

On Windows, the default resources embedded in the executable, including version information and icon, are replaced using rcedit. On OS X, the package metadata stored in Info.plist are replaced.

API

LaunchUI Packager provides a JavaScript API which can be used by custom build scripts.

const packager = require( 'launchui-packager' );

packager( {
  name: 'MyApp',
  version: '1.0.0',
  entry: './dist/main.js',
  out: './packages'
}, function ( err, outPath ) {
  // outPath will be the path of the created package directory or file
} );

The packager() function supports the following options:

Required

  • name: name of the application
  • version: version of the application
  • entry: path of the entry script of the application

Optional

  • out: path of the output directory
  • platform: platform of the package
  • arch: architecture of the package
  • overwrite: if set to true, existing output will be replaced
  • pack: pack the output directory
  • launchuiOpts: additional options passed to launchui.download(), including version and cache
  • company: company name (win32)
  • copyright: copyright information (win32/darwin)
  • identifier: bundle identifier (darwin)
  • category: application category (darwin)
  • icon: path of the icon file (win32/darwin)
  • license: path of the license file
  • dir: path of the directory containing additional files
  • files: a pattern, or an array of patterns, which specify additional files to include in the package

See the command line usage above for more information.

License

LaunchUI Packager is licensed under the MIT license

Copyright (C) 2018 Michał Męciński