sezna / nps

NPM Package Scripts -- All the benefits of npm scripts without the cost of a bloated package.json and limits of json
MIT License
1.43k stars 93 forks source link

fix: print error on init when cannot find a package.json #181

Closed Hypercubed closed 6 years ago

Hypercubed commented 6 years ago

What:

If a user runs nps init in an empty directory with no existing package.json the command fails with a non-user friendly error.

How:

If this "error" is encountered print a friendly error and exit.

Comments:

Instead of exiting out nps init could continue without any package.json scripts and use the local directory as the package-scripts.js path.

kentcdodds commented 6 years ago

Hmmm... Something's busted with the build. It looks unrelated so I'll merge this, but we wont get a release until that's fixed and I wont have time to work on it.

Hypercubed commented 6 years ago

Looks like my change caused the tests to fail... I'll look.

Hypercubed commented 6 years ago

Yeah, my bad... a last minute change added a bug. New PR coming.