ts2famix v2.0.0
FamixTypeScriptImporter
Create a FamixTypeScript model in JSON of TypeScript files.
Installation
npm install ts2famixUsage
Instructions for using the command-line importer:
ts2famix --helpParse a full project
ts2famix -i ../path/to/project/tsconfig.json -o JSONModels/projectName.jsonor
ts2famix -i "../path/to/project/**/*.ts" -o JSONModels/projectName.jsonImport 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';
loadThis 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 testGenerate coverage :
npm run coverageThen, open "coverage/lcov-report/index.html" with your favorite browser :
firefox coverage/lcov-report/index.html &Generate documentation :
npm run docThen, open "docs/index.html" with your favorite browser :
firefox docs/index.html &Generate plantuml and svg of the metamodel :
npm run umlThen, 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.pumlTypeScript Metamodel API documentation (visualization)
The following was generated by CI using tplant, in a similar fashion described here.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago