1.3.1 • Published 3 months ago

ts2famix v1.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

FamixTypeScriptImporter

Node.js CI

Create a FamixTypeScript model in JSON of TypeScript files.

Installation

npm install ts2famix

Usage

Instructions for using the command-line importer:

ts2famix --help

Parse a full project

ts2famix -i ../path/to/project/tsconfig.json -o JSONModels/projectName.json

or

ts2famix -i "../path/to/project/**/*.ts" -o JSONModels/projectName.json

Import the JSON model into Moose 🫎

You need to copy the "JSONModels/projectName.json" into your "Pharo/images/[imageName]" directory.

For a Moose Suite 10 (stable) user with the Pharo directory in the root directory, do :

cp JSONModels/projectName.json ~/Pharo/images/Moose\ Suite\ 10\ \(stable\)/.

Then, in a Moose Playground, do :

Metacello new 
  githubUser: 'fuhrmanator' project: 'FamixTypeScript' commitish: 'master' path: 'src';
  baseline: 'FamixTypeScript';
  load

This command installs the TypeScript metamodel into Moose.

Then, generate the metamodel with :
Library > Famix > Manage metamodels > Regenerate all metamodels

Then, in a Moose Playground, do :

'projectName.json' asFileReference readStreamDo:
  [ :stream | model := FamixTypeScriptModel new 
    importFromJSONStream: stream. model install ].

This command imports the JSON model into Moose.

Developer info

Run tests :

npm test

Generate coverage :

npm run coverage

Then, open "coverage/lcov-report/index.html" with your favorite browser :

firefox coverage/lcov-report/index.html &

Generate documentation :

npm run doc

Then, open "docs/index.html" with your favorite browser :

firefox docs/index.html &

Generate plantuml and svg of the metamodel :

npm run uml

Then, open "doc-uml/metamodel.svg" with your favorite image viewer :

eog doc-uml/metamodel.svg &

Generate an object diagram of the JSON model

ts-node src/famix2puml.ts -i JSONModels/projectName.json -o PUMLModels/projectName.puml

TypeScript Metamodel API documentation (visualization)

The following was generated by CI using tplant, in a similar fashion described here.

FamixTypeScript API Metamodel

1.3.1

3 months ago

1.3.0

3 months ago

1.2.0

3 months ago

1.1.0

8 months ago

1.0.17

8 months ago

1.0.16

8 months ago

1.0.15

8 months ago

1.0.14

8 months ago

1.0.13

8 months ago

1.0.12

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.1

8 months ago