Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/srtucker22/text-operation
Browse files Browse the repository at this point in the history
…into greenkeeper/initial
  • Loading branch information
srtucker22 committed Nov 3, 2017
2 parents d014738 + 95c46ed commit fab82d0
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 9 deletions.
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
language: node_js

sudo: false

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add greenkeeper-lockfile@1

cache:
yarn: true

node_js:
- "8"
- "6"
- "4"

install:
- yarn
- yarn global add coveralls

before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload

script:
# remove unused node modules from cache
- npm run prepublish
- yarn coverage && cat ./coverage/lcov.info | coveralls
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# text-operation [![Npm version](https://img.shields.io/npm/v/text-operation.svg)](https://www.npmjs.com/package/text-operation)
# text-operation [![Npm version](https://img.shields.io/npm/v/text-operation.svg)](https://www.npmjs.com/package/text-operation) [![Build Status](https://travis-ci.org/srtucker22/text-operation.svg?branch=master)](https://travis-ci.org/srtucker22/text-operation) [![Coverage Status](https://coveralls.io/repos/github/srtucker22/text-operation/badge.svg?branch=master)](https://coveralls.io/github/srtucker22/text-operation?branch=master)

[![Greenkeeper badge](https://badges.greenkeeper.io/srtucker22/text-operation.svg)](https://greenkeeper.io/)

Expand All @@ -10,17 +10,20 @@
* [Contributing](#contributing)
* [Licence](#licence)

# Overview
## Overview

This package is heavily based on [firepad](https://github.com/firebase/firepad)'s OT operations, which were in turn based on [ot.js](https://github.com/Operational-Transformation/ot.js/). Yay OSS!

This package is a conversion of their masterful work into ES6, and turned into an easy to use module.

# Installation
```
## Installation

```bash
yarn add text-operation
```

# Usage
## Usage

The easiest way to get familiar with the `TextOperation` class is to check out [text-operation.utils.spec.js](test/text-operation.utils.spec.js)

The OT operations we allow are `retain` `insert` `delete`.
Expand Down Expand Up @@ -77,10 +80,12 @@ console.log(transformed[0].toJSON(), transformed[1].toJSON()); // [ 3, 'ghijk' ]
console.log(transformed[1].apply(op1.apply(simpleString))); // abcghijk
```

# Contributing
## Contributing

This project welcomes code contributions, bug reports and feature requests. Please see the guidelines in [CONTRIBUTING.md](CONTRIBUTING.md) if you are interested in contributing.

# License
## License

MIT License

Copyright (c) 2017 Simon Tucker
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "text-operation",
"version": "1.0.2",
"version": "1.0.3",
"description": "text operation classes for rich text operational transformation",
"main": "./dist/index.js",
"license": "MIT",
"scripts": {
"start": "webpack -w",
"build": "webpack -p",
"prepublish": "npm run build && npm test",
"test": "NODE_ENV=test jest --coverage"
"test": "jest",
"coverage": "jest --coverage"
},
"author": "",
"devDependencies": {
Expand Down

0 comments on commit fab82d0

Please sign in to comment.