Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 880 Bytes

README.md

File metadata and controls

49 lines (33 loc) · 880 Bytes

Luna Log

Terminal log viewer.

Demo

https://luna.liriliri.io/?path=/story/log

Install

Add the following script and style to your page.

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-text-viewer/luna-text-viewer.css" />
<script src="//cdn.jsdelivr.net/npm/luna-text-viewer/luna-text-viewer.js"></script>
<script src="//cdn.jsdelivr.net/npm/luna-log/luna-log.js"></script>

You can also get it on npm.

npm install luna-log luna-text-viewer --save
import 'luna-text-viewer/luna-text-viewer.css'
import LunaLog from 'luna-log'

Usage

const log = new LunaLog(container)
log.setOption({
  log: 'npm install',
})

Configuration

  • log(string): Log to display.
  • maxHeight(number): Max viewer height.
  • wrapLongLines(boolean): Wrap lone lines.

Api

append(log: string): void

Append log.