Closed ungoldman closed 8 years ago
Wow Nate, this is awesome - thank you! Definitely learnt something here - especially on item 3 - that will save me a lot of time trying to hunt down the binaries. I didn't realize node figured that out for non global packages. Thanks!
@timwis yep, anything that is installed in node_modules
and has a bin
property in its package.json
will be symlinked into node_modules/.bin
and accessible by npm scripts. I also add ./node_modules/.bin
to my path so I can run commands in node projects using the project-specific binaries (example). Glad I was able to contribute :)
Hi @timwis!
Cool project! I added a couple things and fixed a couple things, feel free to merge or toss this out if you don't agree as some of the
package.json
fixes are a bit prescriptive.LICENSE
file and linked to it from yourREADME.md
.no-unused-vars
errors intests/
that were causing the linter to fail../node_modules/
binaries inscripts
(npm
will pick these up for you, so you can just write it as"lint": "standard --verbose | snazzy",
instead of"lint": "./node_modules/standard/bin/cmd.js --verbose | ./node_modules/snazzy/bin/cmd.js",
.fixpack
, a handy utility for organizing and lintingpackage.json
files, and added some missing properties (bugs, homepage, keywords, repository).server
script tostart
, so you can just runnpm start
instead ofnpm run server
now.start
andtest
are the two standard script commands thatnpm
will recognize for free (so you can runnpm start
andnpm test
instead ofnpm run ...
-- less typing! yay)start
is also the default command cloud deployment services like heroku will look for.main
property inpackage.json
which was pointing to a non-existentindex.js
file.