JSPM

  • Created
  • Published
  • Downloads 411
  • Score
    100M100P100Q92023F
  • 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

npm downloads NPM version build

Its runtime

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

npm install runtime --save

Implementation status: young, using Bigfoot diapers

This project is the parent of gulp-runtime.

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

On the repo above I'm doing that for gulp so go check it out.

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.

Use case: with gulp

 // Your favourite gulpfile.js
 var runtime = new require('runtime').create('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

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

NPM

License

LICENSE