@openstax/highlighter
TypeScript icon, indicating that this package has built-in type declarations

1.13.0 • Public • Published

Highlighter

Functionality for OpenStax note taking features including:

  • serializing highlights
  • deserializing highlights
  • versioned serialization strategies
  • extracting highlighted content
  • loading wrappers for styling highligted content
  • managing focus/scrolling to highlights

Setup

install nvm

# use the right version of node
nvm install

# install yarn, skip if you have it already
npm install -g yarn

# install dependencies
yarn

To run in development

run these in separate terminals as you develop

# typescript type checking
yarn watch:ts

# unit tests
yarn watch:test

reference changes from another project

do yarn link

# watch for code changes and re-compile:
yarn watch

to deploy

# do build
yarn build:clean

# push to npm (this updates package.json and makes a git tag)
yarn publish [--minor|--major|--patch]

# push to github
git push origin v$(yarn -s current)

# PR the version bump back into master (skip this for weirdo beta or release candidate tags)
open https://github.com/openstax/highlighter/compare/master...v$(yarn -s current)?expand=1

Running the examples with docker

# builds the library for the examples to use
docker-compose run build

# runs the test server on port 8080
docker-compose up serve

Deploy examples to gh-pages

yarn build:clean && yarn deploy:examples

/@openstax/highlighter/

    Package Sidebar

    Install

    npm i @openstax/highlighter

    Weekly Downloads

    4

    Version

    1.13.0

    License

    MIT

    Unpacked Size

    230 kB

    Total Files

    62

    Last publish

    Collaborators

    • bshook37
    • jdivey
    • bshook
    • dantemss
    • tomwoodward
    • philschatz
    • nathanstitt
    • tomjw64
    • staxly