Add messaging around first-run behaviour #17

Merged
mcataford merged 4 commits from first-run-behaviour-messaging into master 2020-05-02 01:30:43 +00:00
Showing only changes of commit 14365c37a5 - Show all commits

View file

@ -33,6 +33,12 @@ if (!existsSync(MANIFEST_FILENAME)) {
console.log(
`Package size (${currentStats.packageSize}) adopted as new limit.`,
)
if (!isUpdatingManifest) {
console.log(
'❗ It looks like you ran PackWatch without a manifest. To prevent accidental passes in CI or hooks, packwatch will termine with an error. If you are running packwatch for the first time in your project, this is expected!',
)
}
// If the update flag wasn't specified, exit with a non-zero code so we
// don't "accidentally" pass CI builds if the manifest didn't exist
process.exit(isUpdatingManifest ? 0 : 1)