JSPM

  • Created
  • Published
  • Downloads 1012
  • Score
    100M100P100Q100631F

A fully working Vue.js terminal emulator.

Package Exports

  • vue-command
  • vue-command/dist/vue-command.css

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 (vue-command) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vue-command

A fully working Vue.js terminal emulator.

Features

  • Parse arguments with yargs-parser
  • Search history
  • Highly customizable

Installation

$ npm i vue-command

Usage

<template>
  <vue-command
    style="max-width: 550px;"
    title="neil@moon ~" 
    :commands="commands"
    :styles="{ border: '0', maxHeight: '150px' }"
    help
  />
</template>

<script>
import VueCommand from './VueCommand'

export default {
  components: {
    VueCommand
  },

  data: () => ({
    commands: {
      'pokedex': args => {
        if (args.color && args._[1] === 'pickachu') return 'yellow'

        return 'usage: pokedex pokemon [option]'
      }
    }
  })
}
</script>

Author

Julian Claus and contributors.

License

MIT