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
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
run these in separate terminals as you develop
# typescript type checking
yarn watch:ts
# unit tests
yarn watch:test
do yarn link
# watch for code changes and re-compile:
yarn watch
# 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
# builds the library for the examples to use
docker-compose run build
# runs the test server on port 8080
docker-compose up serve
yarn build:clean && yarn deploy:examples