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

Add mjs file extension for git style subcommands #950

Merged
merged 1 commit into from
Apr 17, 2019

Conversation

eduardbadillo
Copy link
Contributor

Hi,

I'm sending this PR to add support for .mjs files when executing git style subcommands. The explanation for this type of files can be found here: https://nodejs.org/api/esm.html

Following the Readme file, I've setup some code to run a basic cli program. I have changed the shebang in my files for the following, so I'm able to use JS modules in node:
#!/usr/bin/env node --experimental-modules --no-warnings .

This adds the ability to find .mjs as executable files, as well as the previous .ts and .js.

Please, let me know if something else is required.

Thank you

@shadowspawn
Copy link
Collaborator

Possible release note:

Add ECMAScript Module suffix .mjs for git-style sub-commands

Copy link
Collaborator

@shadowspawn shadowspawn left a comment

Choose a reason for hiding this comment

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

Looks good to me.

(Simple and same pattern as existing code.)

@abetomo abetomo merged commit 143c442 into tj:master Apr 17, 2019
@eduardbadillo eduardbadillo deleted the add_mjs_file_extension branch April 17, 2019 09:18
@shadowspawn shadowspawn mentioned this pull request Jun 19, 2020
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.

3 participants