From aeba9d1d24885a8ec7b070f57218cce8237f193f Mon Sep 17 00:00:00 2001 From: Kelly Mears Date: Mon, 9 Dec 2024 13:59:17 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20fix(patch):=20sage=20default=20p?= =?UTF-8?q?aths=20(#2660)=20(#2667)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes problem with @roots/sage paths. See #2660. ## Type of change **PATCH: backwards compatible change** --- sources/@roots/sage/src/sage/index.ts | 4 +++- sources/@roots/sage/test/sage/extension.test.ts | 15 ++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/sources/@roots/sage/src/sage/index.ts b/sources/@roots/sage/src/sage/index.ts index a7d31d596f..ca2072bd53 100644 --- a/sources/@roots/sage/src/sage/index.ts +++ b/sources/@roots/sage/src/sage/index.ts @@ -67,10 +67,12 @@ class Sage extends Extension { bud .setPath({ '@dist': `public`, + '@src': `resources`, + }) + .setPath({ '@fonts': `@src/fonts`, '@images': `@src/images`, '@scripts': `@src/scripts`, - '@src': `resources`, '@styles': `@src/styles`, '@views': `@src/views`, }) diff --git a/sources/@roots/sage/test/sage/extension.test.ts b/sources/@roots/sage/test/sage/extension.test.ts index f6c7f98d4b..f73fa1f053 100644 --- a/sources/@roots/sage/test/sage/extension.test.ts +++ b/sources/@roots/sage/test/sage/extension.test.ts @@ -60,10 +60,11 @@ describe(`@roots/sage`, async () => { await bud.extensions.add(`@roots/sage`) expect(bud.extensions.has(`@roots/sage/blade-loader`)).toBeTruthy() - expect(bud.extensions.get(`@roots/sage/blade-loader`).enabled).toBeTruthy() + expect( + bud.extensions.get(`@roots/sage/blade-loader`).enabled, + ).toBeTruthy() }) - it(`sage.blade.enable`, async () => { expect(bud.extensions.has(`@roots/sage/blade-loader`)).toBeFalsy() @@ -71,7 +72,9 @@ describe(`@roots/sage`, async () => { bud.sage.blade.enable(false).done() - expect(bud.extensions.get(`@roots/sage/blade-loader`).enabled).toBeFalsy() + expect( + bud.extensions.get(`@roots/sage/blade-loader`).enabled, + ).toBeFalsy() }) it(`should register errything`, async () => { @@ -82,10 +85,12 @@ describe(`@roots/sage`, async () => { expect(setPathSpy).toHaveBeenCalledWith({ '@dist': `public`, + '@src': `resources`, + }) + expect(setPathSpy).toHaveBeenCalledWith({ '@fonts': `@src/fonts`, '@images': `@src/images`, '@scripts': `@src/scripts`, - '@src': `resources`, '@styles': `@src/styles`, '@views': `@src/views`, }) @@ -98,7 +103,7 @@ describe(`@roots/sage`, async () => { expect(bud.hooks.filter(`build.output.uniqueName`)).toEqual( // @ts-ignore - bud.sage.getUniqueName() + bud.sage.getUniqueName(), ) })