ast-aware-diff-view
## Features
Last updated a year ago by samirtalwar .
UNLICENSED · Original npm · Tarball · package.json
$ cnpm install ast-aware-diff-view 
SYNC missed versions from official npm registry.

AST-aware Diff View

Features

  • line-based diffing
  • syntax highlighting with Prism (done properly, not just per line)
  • highlight the relevant AST node on hover (JavaScript only)
  • collapse/expend long snippets of unchanged code
  • server side rendering (./src/main returns a plain HTML string)

Todo

  • add some tests...
  • support more languages

It is currently supporting JavaScript only because it's using Babylon to find the start and end position of each AST node. The next step is to switch to something like http://tree-sitter.github.io/tree-sitter/ to try and support a range of languages (including python).

Example

See ./example/example.html for an example of output (with some CSS and javascript). This was generated by running (cd ./example; node generate.js).

Current Tags

  • 1.0.1                                ...           latest (a year ago)

1 Versions

  • 1.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (20)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |