GitXplorerGitXplorer
r

diagres

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
d10cffedc2efa2aa9112ccc9bd41fe6f5d5d0234

update

rrhalff committed 9 years ago
Unverified
97898e651f2e354e343c0a398f34e7edaf419067

.png

rrhalff committed 9 years ago
Unverified
f35912168e85ca30fd8542c5f7d3f737b9e2c7da

raw

rrhalff committed 9 years ago
Unverified
bfd6f99b7484d639b7dc52a50780a9b53fc15124

update readme

rrhalff committed 9 years ago
Unverified
7f52ff2542248c80c8b59fe161127f16a01694b9

use node6 preset

rrhalff committed 9 years ago
Unverified
7e53954f523950c2b6b5ae36b61524161fffd478

lint

rrhalff committed 9 years ago

README

The README file for this repository.

Diagres

Tool to generate class diagrams from es2015 code.

Example usage:

DEBUG=diagres diagres --pattern 'src/*.js' > test.puml

The parser itself is not aware of all es7 features, so if you want to parse those you'll first have to transpile the code and then point diagres at the transpile code.

e.g.

npm run your-build-process
DEBUG=diagres diagres --pattern 'dist/*.js' > test.puml

The parser looks for Class and Method Definitions, so make sure those have not been transpiled.

Example:

$ diagres -p 'git/teflon/src/**/*.js' > test.puml # a project
@startuml

class Events {
-_handleEvent(ev)
+addEventHandler(type, alias, action)
+off(event, listener)
+on(event, listener)
+removeEventHandler(type, alias, action)
+removeEventHandlers(type)
}
class Teflon {  
  
etc...

To convert to a e.g. a .png:

$ dot -Tpng -otest.png test.puml

Useful plantuml plugin for WebStorm:

https://github.com/esteinberg/plantuml4idea