static-dev / spike-core

:warning: UNMAINTAINED :warning: A modern static build tool, powered by webpack
https://spike.js.org
Other
58 stars 9 forks source link

Check for package.json before trying to install dependencies #273

Closed adamkiss closed 6 years ago

adamkiss commented 6 years ago

The tests kept failing when running multiple times, because this Spike.new tries to install NPM dependencies without a check for existence of a package.json file, so if the new Spike project was in a child directory of another node project, it would call the 'npm install --production' on the parent instead — which is a problem, especially for repositories using yarn.

This add a synchronous explicit check for 'package.json' before trying to install.