fix: if first run, show message

This commit is contained in:
Remy Sharp
2018-05-05 20:04:38 +01:00
parent 66943b8419
commit 5ce716c866

4
bin/postinstall.js Normal file → Executable file
View File

@@ -1,3 +1,5 @@
#!/usr/bin/env node
function main() {
if (process.env.SUPPRESS_SUPPORT) {
return;
@@ -15,7 +17,7 @@ function main() {
const conf = new Configstore(pkg.name);
const last = conf.get('lastCheck');
if (now - week > last) {
if (!last || now - week > last) {
console.log('\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donate\u001b[0m\n');
conf.set('lastCheck', now);
}