JSPM

  • Created
  • Published
  • Downloads 411
  • Score
    100M100P100Q92027F
  • License MIT

a runtime interface

Package Exports

  • runtime
  • runtime/lib/command/warning
  • runtime/lib/utils

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (runtime) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Its runtimeprogressed.io

Implementation status: young

This project is a spin-off of gulp-runtime.

Its aim is to provide a runtime cli for your node application where you can use custom commands. But locally instead of globally. That is: no npm -g for your cli.

There is no common ground here, because what it does is associate a command(s) to a function so you can do pretty much whatever you want with it.

I was trying to use gulp at runtime and end up here.

Use case: with gulp

 // Your favourite gulpfile.js
 var runtime = new require('runtime').createInterface('gulp');

At runtime, when you want to see the prompt, press enter.

[13:07:50] Starting 'default'...
[13:07:50]  > default
[13:07:50] Finished 'default' after 800 μs
 > gulp

The prompt by it self does nothing, but if you wrote a custom command

runtime.set('yeeeha', function(){

  console.log('Start dancing!')
});

Life changed

> gulp yeeeha
Start dancing!
> gulp

Missing some better docs, I know. For now you can look at the original project documentaion.

TODO

  • Support standard shell behavior (Ctrl+L, Ctrl+C, history, etc.).
    • readline to the rescue. It even provides completion options!
  • API documentation.
  • Command completion.
  • Register custom runtime commands.
  • Write tests.

NPM

License

MIT