-
Notifications
You must be signed in to change notification settings - Fork 83
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
Arbitrary compiler options #40
Arbitrary compiler options #40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a very small change in the example. Overall, it's good! :)
examples/index.js
Outdated
@@ -14,7 +14,7 @@ Cobol(function () {/* | |||
DISPLAY "Hello world". | |||
PROGRAM-DONE. | |||
STOP RUN. | |||
*/}, function (err, data) { | |||
*/}, {compileargs:{free:true}}, function (err, data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please write this on multiple lines, so it won't be so condensed?
if (options.free) { | ||
args.free = options.free; | ||
} | ||
Object.assign(args, options.compileargs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good!
Made the change to make the statement a bit more spacious :) |
@IonicaBizau I'm kinda new to adding things to open-source :) please notify me if another pull request or something has to be done. I should have fixed the example so that it's less condensed |
@B14m3m3 Sorry, I just missed your last commit. 🙈 Do ping me in such cases. Merging right now. 🚢 |
Added a compiler options object that will be passed to the compiler, to enhance the thing in issue #39.
This should allow the user to specific whatever options there are in the cobc as required. I've added the free flag in the
Hello world
example to show the intended change.As a small side change i also made was adding a callback to the Fs.unlink as it was giving deprecation errors :). Currently the callback does nothing.