# npm-launcher

> NPM scripts gui launcher

Latest version **0.0.8** (published 2018-11-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install npm-launcher
pnpm add npm-launcher
yarn add npm-launcher
bun add npm-launcher
```

Provides the command `npm-launcher`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2018-11-27 |
| First published | 2018-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 59.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | lilliputten |
| Maintainers | lilliputten |
| Keywords | npm, launch, launcher, run, scripts, commands, gui |

## Links

- npm: https://www.npmjs.com/package/npm-launcher
- Repository: https://github.com/lilliputten/npm-launcher
- Homepage: https://github.com/lilliputten/npm-launcher#readme
- Issues: https://github.com/lilliputten/npm-launcher/issues
- npm.io page: https://npm.io/package/npm-launcher

## Dependencies (5)

- [inherit](https://npm.io/package/inherit.md) ^2.2.7
- [clipboardy](https://npm.io/package/clipboardy.md) ^1.2.3
- [dateformat](https://npm.io/package/dateformat.md) ^3.0.3
- [libui-node](https://npm.io/package/libui-node.md) ^0.2.1
- [npm-package-user-scripts-list](https://npm.io/package/npm-package-user-scripts-list.md) 0.1.10

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.0.8 (latest) — 2018-11-27

## README

[![npm version](https://badge.fury.io/js/npm-launcher.svg)](https://badge.fury.io/js/npm-launcher)

# npm-launcher

(Former `npm-package-user-scripts-gui`.)

GUI interface to `npm-package-user-scripts-list` command.

The idea of this tool came to my mind when I tried to introduce my son to the
development of node projects and manage them using npm scripts from the
console.

This script scans current project (in running path) `package.json` commands (see
[npm-package-user-scripts-list](https://github.com/lilliputten/npm-package-user-scripts-list)
for parsing details) and shows minimalistic window for interactive running your
service tasks.

Take in mind that the content of the log tab is updated only after the command
is completed. All logs are doubled on stdout.

It may be preferable to install the package globally because each local
installation recompiles its own `libui` library instance.

## Requirements

See [LibUI-Node
Requirements](https://github.com/parro-it/libui-node#prerequisites) -- used
interface engine (required some build tools for compiling sources).

## Installation

For current project:

```shell
$ npm i -S npm-launcher
```
Global:
```shell
$ npm i -g npm-launcher
```

## Usage

In js code:

```js
const ScriptCommandsGUI = require('./');

const commandsWindow = new ScriptCommandsGUI({

  // See options reference below...

  /** Datetime format */
  dateformat: 'yyyy.mm.dd, HH:MM:ss',

  /** Minimal window width */
  width: 800,

});

commandsWindow.showWindow();
```

Linux/MacOS shell command line:
```shell
$ npm-launcher &
```

Windows shell command line (console window will be opened, minimized and closed after program finish):
```shell
$ start /min npm run -s cmd-gui ^& exit
```

Another convenient way to run the program on Windows is with vbasic script like this:
```vbscript
CreateObject("Wscript.Shell").Run "npm run -s cmd-gui", 0
```

(Thanks to Kees Bakker, see his article [How to start Node.js app windowless in
Windows](https://keestalkstech.com/2016/07/start-nodejs-app-windowless-windows/).)

See also scripts `npm-launch.cmd`, `npm-launch.sh`, `npm-launch.vbs` (included
in package) for global-installed package launch.

## Options

All options are optional. :)

<!-- options begin -->
<!-- generated via `scan-options.sh` at 2018.11.27 01:36:25 -->
- **execOptions**: Exec options (for `child_process.exec`); @see [child_process.exec](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) (default: `{}`)
- **dateformat**: Format datetime for logging; @see [felixge/node-dateformat](https://github.com/felixge/node-dateformat#usage) (default: `'yyyy.mm.dd HH:MM:ss'`)
- **width**: Minimal window width (default: `600`)
- **height**: Minimal window height (default: `200`)
- **title**: Window title (if can't to generate from `package.json`'s `name` field) (default: `'Commands'`)
- **commands**: Commands list (default: `{ test: { title: 'Test' } }`)
- **buttonSpaces**: Spaces for adding before and after button text (default: `' '`)
<!-- options end -->

## Screenshots

Initial screen:

![Initial screen](screenshots/01-initial-screen.png "Initial screen")

Running command:

![Running command](screenshots/02-lint-running.png "Running command")

Successfully finished command:

![Successfully finished command](screenshots/03-lint-done.png "Successfully finished command")

Log tab:

![Log tab](screenshots/04-log-screen.png "Log tab")

Failed command:

![Failed command](screenshots/05-lint-error.png "Failed command")

Show error in the log tab:

![Show error in the log tab](screenshots/06-lint-error-log.png "Show error in the log tab")

## See also:

- [TODO](TODO.md)
- [CHANGELOG](CHANGELOG.md)
- [lilliputten/npm-package-user-scripts-list: List all available npm script commands](https://github.com/lilliputten/npm-package-user-scripts-list)
- [parro-it/libui-node: Node bindings for libui, an awesome native UI library for Unix, OSX and Windows](https://github.com/parro-it/libui-node)

<!--
@version 2018.11.27, 20:24
-->

---
_Source: https://npm.io/package/npm-launcher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
