0.4.0 • Published 6 years ago

vue-pgn v0.4.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

vue-pgn

npm npm vue2

A Vue.js component for browsing chess games in pgn format. Uses chess.js under the hood.

Demo: https://deemaagog.github.io/vue-pgn/

Installation

npm install --save vue-pgn

Import

import {vuepgn} from 'vue-pgn'
import 'vue-pgn/dist/vue-pgn.css'

export default {
  components: {vuepgn},
  data() {
    return {
      pgn: '1. g4 e5 2. f4 Qh4',
      height: 300,
    };
  },
};
</script>

<template>
  <div>    
    <vuepgn v-bind="{pgn,height}"/>
  </div>
</template>

Browser

<div id="app">
  <vuepgn v-bind="{pgn,height}"></vuepgn>
</div>

<link rel="stylesheet" href="vue-pgn/dist/vue-pgn.css"/>

<script src="vue.js"></script>
<script src="vue-pgn/dist/vue-pgn.browser.js"></script>

<script>
new Vue({
  el: '#app',
  components: {
    VuePgn
  },
  data() {
    return {
      pgn: '1. g4 e5 2. f4 Qh4',
      height: 300,
    };
  }
});
</script>

License

MIT

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago