Skip to content

Make it compatible with Node.js 4 #6

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ParidelPooya
Copy link

I rewrote the restructuring. Should be good now.

Convert it to make it compatible with older version of Node.js
Object destructuring assignment like "const { version, name } = require('./package.json');" is not supported in Node.js 4 so this change makes it compatible with older Node.
Copy link
Owner

@garthk garthk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we're not destructuring, the extra noise near the imports bothers me more than I imaine dereferencing through the package name will. Could you try const pkg = require('./package.json') up the top, pkg.name and pkg.version further down, and similar changes for path and fs?

If it looks awful, no need to commit, just let me know. Or, if you'd rather I do the work, let me know and I'll merge and clean up.

I'm not sure transpileModule and readConfigFile are good names for the results of the ts.transpileModule and readConfigFile calls. Try results or output, perhaps? (I'm having a low imagination morning; I bet you can do better.)

Very close. Thanks!

@ParidelPooya
Copy link
Author

Is it better now?

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

Successfully merging this pull request may close these issues.

2 participants