1.4.2 • Published 8 years ago

diagres v1.4.2

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

Diagres

Tool to generate class diagrams from es2015 code.

npm.io

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

1.4.2

8 years ago

1.4.1

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago