@singapor/diff
v0.1.1
Published
Diff rendering and editor-diff helpers for Singapor.
Readme
@singapor/diff
Diff rendering and editor-diff helpers for Singapor.
Install
npm install @singapor/core @singapor/panes @singapor/diffUsage
import { DiffView, parseGitPatch } from '@singapor/diff'
import '@singapor/core/style.css'
import '@singapor/diff/style.css'
const files = parseGitPatch(patchText)
const diffView = new DiffView(document.querySelector('#diff')!, { files })Exports
DiffViewrenders split or stacked file diffs.createEditorDiffPluginadds live inline diff projection to an editor.parseGitPatchandcreateTextDiffbuild diff models.createSplitProjection,createStackedProjection, andcreateLiveDiffProjectionexpose render projections.
