ts2famix v1.3.1
FamixTypeScriptImporter
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.
3 months ago
3 months ago
3 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago