accurat / accurapp

Create JS apps with flexible build configuration, tailored for the specific needs of Accurat
MIT License
21 stars 5 forks source link

Wrong `Unknown script "build"` #34

Closed caesarsol closed 7 years ago

caesarsol commented 7 years ago

https://github.com/accurat/accurapp/blob/master/packages/accurapp-scripts/bin/scripts.js#L31

The try catch gives NOT_FOUND even if a sub-sub-module of build.js has a module not found.

Would be better to use require.resolve and/or fs.exists() to check for the existence of the script/

cc @marcofugaro @nkint