Skip to content
CONSTRUCTING

Asciinema Player

Word count
194 words
Reading time
2 minutes

Installation

Install @nolebase/ui-asciinema to your project dependencies by running the following command:

shell
ni @nolebase/ui-asciinema
shell
pnpm add @nolebase/ui-asciinema
shell
npm install @nolebase/ui-asciinema
shell
yarn add @nolebase/ui-asciinema

Usage

js
// vite.config.ts
export default defineConfig({
  ssr: {
    noExternal: [
      // If there are other packages that need to be processed by Vite, you can add them here.
      '@nolebase/ui-asciinema',
    ],
  },
})
vue
<script setup>
// somewhere.vue
import { NuAsciinemaPlayer } from '@nolebase/ui-asciinema'
import 'asciinema-player/dist/bundle/asciinema-player.css'
</script>

<template>
  <NuAsciinemaPlayer
    src="/asciinema/test-nyancat.cast"
    :preload="true"
    :cols="400"
    :rows="40"
    :auto-play="true"
    :controls="true"
    :terminal-font-size="'12px'"
    :loop="true"
  />
</template>

Acknowledgements

Contributors

Changelog