From ec339f27178e099a1ea7b9cd5f959f77de31c34c Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Thu, 6 Jul 2023 00:29:45 -0400 Subject: [PATCH] Fix Nodemon config --- scripts/buildHomebrew.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/buildHomebrew.js b/scripts/buildHomebrew.js index f5bb0b024..855fd3a63 100644 --- a/scripts/buildHomebrew.js +++ b/scripts/buildHomebrew.js @@ -2,7 +2,7 @@ const fs = require('fs-extra'); const zlib = require('zlib'); const Proj = require('./project.json'); -const { pack, watchFile, livereload } = require('vitreum'); +const { pack, watchFile } = require('vitreum'); const isDev = !!process.argv.find((arg)=>arg=='--dev'); const lessTransform = require('vitreum/transforms/less.js'); @@ -135,12 +135,11 @@ fs.emptyDirSync('./build'); })().catch(console.error); -//In development set up a watch server and livereload +//In development, set up a watch server (uses Nodemon) if(isDev){ - livereload('./build'); - watchFile('./server.js', { // Rebuild when change detected to this file or any nested directory from here - ignore : ['./build'], // Ignore ./build or it will rebuild again - ext : 'less', // Other extensions to watch (only .js/.json/.jsx by default) - //watch: ['./client', './server', './themes'], // Watch additional folders if you want + watchFile('./server.js', { // Restart server when change detected to this file or any nested directory from here + ignore : ['./build', './client', './themes'], // Ignore folders that are not running server code / avoids unneeded restarts + ext : 'js json' // Extensions to watch (only .js/.json by default) + //watch : ['./server', './themes'], // Watch additional folders if needed }); }