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 node shebang to single JS builds #915

Merged
merged 1 commit into from
Oct 13, 2016
Merged

Conversation

eknkc
Copy link
Contributor

@eknkc eknkc commented Oct 12, 2016

Summary

Adds #!/usr/bin/env node at the top of single JS builds so they can be run directly if execute permissions are set. Fixes #888

Test plan

npm run test has no changes.

@bestander
Copy link
Member

bestander commented Oct 13, 2016

@eknkc, we don't have unit tests for this feature yet.
Could you use this Test Plan:

node ./scripts/build-webpack.js
./dist/yarn-v<version>.js -V

And confirm that it works

@eknkc
Copy link
Contributor Author

eknkc commented Oct 13, 2016

@bestander

Naively testing the script works:

$ ./scripts/build-webpack.js
$ ./dist/yarn-0.15.1.js -V
0.15.1

Tried it with reinstalling own packages;

$ ./scripts/build-webpack.js
$ ./dist/yarn-0.15.1.js                                                                 
yarn install v0.15.1
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
✨  Done in 9.42s.

@bestander
Copy link
Member

Great! thanks for the the PR, @eknkc

@bestander bestander merged commit ecbceeb into yarnpkg:master Oct 13, 2016
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