From dbe22cdee2caaf36b58d2db72f426886e3e403e5 Mon Sep 17 00:00:00 2001 From: Kelvin Oghenerhoro Omereshone Date: Thu, 6 Feb 2025 23:05:23 +0100 Subject: [PATCH] feat: add check to make sure Shipwright don't build assets if --dotLift is set (#10) --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 4a64aaf..8d39c02 100644 --- a/index.js +++ b/index.js @@ -50,6 +50,11 @@ module.exports = function defineShipwrightHook(sails) { * Runs when this Sails app loads/lifts. */ initialize: async function () { + // Skip asset building if --dontLift is set + if (sails.config.dontLift) { + sails.log.info('shipwright: Skipping asset build due to dontLift flag') + return + } const hook = this const appPath = sails.config.appPath const defaultConfigs = defineConfig({ @@ -136,7 +141,6 @@ module.exports = function defineShipwrightHook(sails) { sails.on('lower', async () => { await rsbuildDevServer.close() }) - sails.after('lifted', () => {}) } sails.config.views.locals = { shipwright: {