`exec` instead of `bin` on package.json


(Davi Ortega) #1

This is a naming issue.

I know that this might break a lot of things, but it seems to me that the executable javascript scripts should be under exec, and not bin, in the package.json.

These files, that now are pointed in bin are actually plain javascript and not binary. They are, however, executables as they must include #!/usr/bin/env node.

So, my suggestion is to make both acceptable: bin or exec?


(Roy Revelt) #2

No offence but this is logically valid but very bad idea. Renaming is tedious and impossible. Adding second CLI entry point breaks common habits. I remember I came onto the JS open source “scene” and looked at ESLint source and didn’t understand what “bin” folder did. To me it was just a folder. It took some time to discover and backwards engineer a Sindre’s CLI app to learn how CLI’s and bin works. To this day, not many front-end peeps really know how to wire up a CLI app (link keys in package.json, add that special row at the top, npm link)…

Let’s forget this, there are serious unsolved problems, especially maintenance-related that we should concentrate on. For example, monorepos require whole ecosystem of tooling reworked to serve that way of working. I had to write a replacement for npm-check-update. These kinds of problems.

:relaxed: