Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScriptModuleGen has few issues... #3

Open
apawsey opened this issue Oct 4, 2016 · 0 comments
Open

TypeScriptModuleGen has few issues... #3

apawsey opened this issue Oct 4, 2016 · 0 comments

Comments

@apawsey
Copy link

apawsey commented Oct 4, 2016

Hey guys,

Just realised I need to rather use the module syntax, and found a few issues that needed to be rectified to get the script to run... sorry I don't currently have a PR for these, I'll do one as soon as I get a chance, but I thought it easier to let you know in case you have time before me.

  • Need to add var fs = require('fs'); at the top of tsgen.js file, or you get fs undefined error.
  • var config = argvToConfig; line should be var config = argvToConfig(); to actually execute the function.
  • Documentation states output folder is specified with --output but it actually has to be --outputFolder.
  • In argvToConfig function, check at the end should be if (!config.inputFileName || !fs.existsSync(config.inputFileName)) { instead of if (!inputFileName || !fs.existsSync(inputFileName)) {
  • In tsgen-core.js, there is a reference in the processRawMetadata function to config.baseClassName, but the property is actually config.baseClassFileName
  • use of a base class is not working,

Otherwise it's a really great tool. One question though, would it not be better to make it one tool with an option for module or entity syntax output? Surely make it easier to maintain? I haven't had to check enough the differences, so that may well be a stupid idea for various reasons, just a thought.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant