Skip to content

spotonlive/vue-highlighter

Repository files navigation

VueHighlighter

npm vue2

A Vue.js Plugin

Installation

npm install --save @spotonmarketing/vue-highlighter

Usage

Bundler (Webpack, Rollup)

import Vue from 'vue'
import VueHighlighter from '@spotonmarketing/vue-highlighter'
// You need a specific loader for CSS files like https://github.com/webpack/css-loader
import '@spotonmarketing/vue-highlighter/dist/@spotonmarketing/vue-highlighter.css'

Vue.use(VueHighlighter)

Browser

<!-- Include after Vue -->
<!-- Local files -->
<link rel="stylesheet" href="@spotonmarketing/vue-highlighter/dist/@spotonmarketing/vue-highlighter.css"></link>
<script src="@spotonmarketing/vue-highlighter/dist/@spotonmarketing/vue-highlighter.js"></script>

<!-- From CDN -->
<link rel="stylesheet" href="https://unpkg.com/@spotonmarketing/vue-highlighter/dist/@spotonmarketing/vue-highlighter.css"></link>
<script src="https://unpkg.com/@spotonmarketing/vue-highlighter"></script>

Development

Launch visual tests

npm run dev

Launch Karma with coverage

npm run dev:coverage

Build

Bundle the js and css of to the dist folder:

npm run build

Publishing

The prepublish hook will ensure dist files are created before publishing. This way you don't need to commit them in your repository.

# Bump the version first
# It'll also commit it and create a tag
npm version
# Push the bumped package and tags
git push --follow-tags
# Ship it 🚀
npm publish

License

MIT

About

Simple element highlighter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published