Skip to content

Conversation

@jasonkarns
Copy link
Contributor

Manually prepending $(npm bin) to dependencies is redundant in npm scripts. Npm already prepends $(npm bin) to $PATH before executing scripts.

Manually prepending `$(npm bin)` to dependencies is redundant in npm scripts. Npm already prepends `$(npm bin)` to `$PATH` before executing scripts.
@jasonkarns
Copy link
Contributor Author

jasonkarns commented May 25, 2017

reopen of #19 (rebased onto master, and CLA signed)

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

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

Lgtm

@mikeproeng37 mikeproeng37 merged commit 6c5beec into optimizely:master May 26, 2017
jasonkarns added a commit to jasonkarns/javascript-sdk that referenced this pull request Jun 2, 2017
Again, same issue as optimizely#56, there is no need to point directly at the node_modules bin because npm purposefully prepends `$(npm bin)` to `PATH` when running scripts.

(Which is in addition to the fact that `./node_modules/karma/bin/karma` is the wrong path. It's brittle and reliant on karma always keeping that file in the same location with the same name. Correct location for binaries is where npm symlinks them, as instructed by the `bin` property of package.json: `./node_modules/.bin/karma`. But again, all is unnecessary because npm has the feature specifically to avoid this.)
@jasonkarns jasonkarns deleted the patch-1 branch June 16, 2020 18:14
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