From 085d0d1d823b4a99612c7d1761d3460889b7345b Mon Sep 17 00:00:00 2001 From: Kelvin Oghenerhoro Omereshone Date: Thu, 4 Jan 2024 00:24:39 +0100 Subject: [PATCH 1/4] [fix] error when trying to copy missing images or fonts (#1) * fix: add noErrorOnMissing to images and fonts * chore: remove experimental code --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 44227c5..d7ca43b 100644 --- a/index.js +++ b/index.js @@ -38,11 +38,13 @@ module.exports = function defineShipwrightHook(sails) { copy: [ { from: path.resolve(appPath, 'assets', 'images'), - to: path.resolve(appPath, '.tmp', 'public', 'images') + to: path.resolve(appPath, '.tmp', 'public', 'images'), + noErrorOnMissing: true }, { from: path.resolve(appPath, 'assets', 'fonts'), - to: path.resolve(appPath, '.tmp', 'public', 'fonts') + to: path.resolve(appPath, '.tmp', 'public', 'fonts'), + noErrorOnMissing: true }, { context: path.resolve(appPath, 'assets'), From 999d369ea3e5ec7a801c45b2c625bc01d6f5883c Mon Sep 17 00:00:00 2001 From: Kelvin Oghenerhoro Omereshone Date: Thu, 4 Jan 2024 00:21:14 +0100 Subject: [PATCH 2/4] fix: add noErrorOnMissing to images and fonts --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index d7ca43b..32141e6 100644 --- a/index.js +++ b/index.js @@ -73,6 +73,8 @@ module.exports = function defineShipwrightHook(sails) { if (process.env.NODE_ENV == 'production') { rsbuild.build() } else { + const serverAPIs = await rsbuild.getServerAPIs() + console.log(serverAPIs) rsbuild.build({ mode: 'development', watch: true }) } } catch (error) { From 5c2fcd982f1a827de90c0ff45b141d8097623b59 Mon Sep 17 00:00:00 2001 From: Kelvin Oghenerhoro Omereshone Date: Thu, 4 Jan 2024 00:23:52 +0100 Subject: [PATCH 3/4] chore: remove experimental code --- index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/index.js b/index.js index 32141e6..d7ca43b 100644 --- a/index.js +++ b/index.js @@ -73,8 +73,6 @@ module.exports = function defineShipwrightHook(sails) { if (process.env.NODE_ENV == 'production') { rsbuild.build() } else { - const serverAPIs = await rsbuild.getServerAPIs() - console.log(serverAPIs) rsbuild.build({ mode: 'development', watch: true }) } } catch (error) { From 6f70205e45071aa04b6c28642c64fb4e17ddd5f9 Mon Sep 17 00:00:00 2001 From: Kelvin Oghenerhoro Omereshone Date: Thu, 4 Jan 2024 00:25:58 +0100 Subject: [PATCH 4/4] chore: release 0.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4ca2309..b40db46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sails-hook-shipwright", - "version": "0.0.1", + "version": "0.0.2", "description": "The modern asset pipeline for Sails", "main": "index.js", "scripts": {