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 a wrapper script to expose bin/juttle in an outrigger installation #86

Merged
merged 1 commit into from
Jan 18, 2016

Conversation

demmer
Copy link
Collaborator

@demmer demmer commented Jan 18, 2016

Include a simple bin/juttle script that resolves the local juttle
installation and then requires it. This way an installation of outrigger
will make it easy to run juttle CLI commands as well.

Include a simple `bin/juttle` script that resolves the local juttle
installation and then requires it. This way an installation of outrigger
will make it easy to run juttle CLI commands as well.
@demmer
Copy link
Collaborator Author

demmer commented Jan 18, 2016

@mstemm @dmajda

@mstemm
Copy link
Collaborator

mstemm commented Jan 18, 2016

I haven't seen this technique before--does it properly handle command line arguments, etc. properly?

I guess there wasn't any way to take the actual program from the juttle repo and pull it up as a part of npm install?

@demmer
Copy link
Collaborator Author

demmer commented Jan 18, 2016

@mstemm Yes it works fine. The only way in node to determine whether a file was loaded as the actual top-level file as opposed to something loaded from require is to check if (require.main === module).

However process.args and everything else used in the main execution is agnostic of the context.

@mstemm
Copy link
Collaborator

mstemm commented Jan 18, 2016

lgtm then!

demmer added a commit that referenced this pull request Jan 18, 2016
add a wrapper script to expose bin/juttle in an outrigger installation
@demmer demmer merged commit 6b13b6a into master Jan 18, 2016
@demmer demmer deleted the install-juttle-cli branch January 18, 2016 18:55
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