koca / vue-live

A component to demo components, inspired by react-live

Home Page:http://vue-live.surge.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-live

A lightweight playground for live editing VueJs code in the browser

Build Status NPM Version NPM Downloads semantic-release


Usage

The simplest way to render components is as a VueJs template:

<template>
    <VueLive :code="`<date-picker />`" :components="{ DatePicker }" @error="(e) => handleError(e)">
</template>

<script>
import { VueLive } from "vue-live";
import DatePicker from "vuejs-datepicker"

export default {
    components: { VueLive },
    data(){
        return {
            // make DatePicker available in template
            DatePicker
        }
    }
}
</script>

Check out the demo for alternative syntaxes to write your showcases.

How to contribute

npm ci

Compiles and hot-reloads for development

npm run start

Compiles and minifies library for production using rollup

npm run build

Run unit and e2e tests

npm run test:unit
npm run test:e2e

Lints and fixes files

npm run lint

About

A component to demo components, inspired by react-live

http://vue-live.surge.sh/


Languages

Language:JavaScript 63.0%Language:Vue 35.4%Language:HTML 1.6%