From ebbf8efcd921068c88689488285ece134c61546c Mon Sep 17 00:00:00 2001 From: Mat Groves Date: Thu, 25 Apr 2024 14:53:55 +0100 Subject: [PATCH] fix test and merge bits --- packages/spine/src/spineAtlasCacheBuster.ts | 2 +- packages/spine/test/spineAtlasAll.test.ts | 6 +++--- .../src/texturePackerCacheBuster.ts | 2 +- .../test/texturePackerAll.test.ts | 18 ++++++++---------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/packages/spine/src/spineAtlasCacheBuster.ts b/packages/spine/src/spineAtlasCacheBuster.ts index 2272b51..48c15c0 100644 --- a/packages/spine/src/spineAtlasCacheBuster.ts +++ b/packages/spine/src/spineAtlasCacheBuster.ts @@ -1,8 +1,8 @@ import type { Asset, PluginOptions } from '@play-co/assetpack-core'; import { checkExt, type AssetPipe, findAssetsWithFileName } from '@play-co/assetpack-core'; -import type { MipmapOptions } from '@play-co/assetpack-plugin-mipmap-compress'; import { AtlasView } from './AtlasView'; import { removeSync, writeFileSync } from 'fs-extra'; +import type { MipmapOptions } from '@play-co/assetpack-plugin-image'; export type SpineCacheBusterOptions = PluginOptions<'fix' | 'nc'> & MipmapOptions; diff --git a/packages/spine/test/spineAtlasAll.test.ts b/packages/spine/test/spineAtlasAll.test.ts index 66cf306..901b46a 100644 --- a/packages/spine/test/spineAtlasAll.test.ts +++ b/packages/spine/test/spineAtlasAll.test.ts @@ -106,14 +106,14 @@ describe('Spine Atlas All', () => output: outputDir, cache: false, pipes: [ + mipmap({ + resolutions: { default: 1, low: 0.5 }, + }), compress({ png: true, webp: true, jpg: true, }), - mipmap({ - resolutions: { default: 1, low: 0.5 }, - }), spineAtlasMipmap({ resolutions: { default: 1, low: 0.5 }, }), diff --git a/packages/texture-packer/src/texturePackerCacheBuster.ts b/packages/texture-packer/src/texturePackerCacheBuster.ts index dbaf3cc..cfd8424 100644 --- a/packages/texture-packer/src/texturePackerCacheBuster.ts +++ b/packages/texture-packer/src/texturePackerCacheBuster.ts @@ -1,6 +1,6 @@ import type { Asset, PluginOptions } from '@play-co/assetpack-core'; import { checkExt, type AssetPipe, findAssetsWithFileName } from '@play-co/assetpack-core'; -import type { MipmapOptions } from '@play-co/assetpack-plugin-mipmap-compress'; +import type { MipmapOptions } from '@play-co/assetpack-plugin-image'; import { removeSync, writeFileSync } from 'fs-extra'; export type SpineOptions = PluginOptions<'fix' | 'nc'> & MipmapOptions; diff --git a/packages/texture-packer/test/texturePackerAll.test.ts b/packages/texture-packer/test/texturePackerAll.test.ts index e18af9d..18eda2f 100644 --- a/packages/texture-packer/test/texturePackerAll.test.ts +++ b/packages/texture-packer/test/texturePackerAll.test.ts @@ -5,8 +5,8 @@ import { cacheBuster } from '@play-co/assetpack-plugin-cache-buster'; import { readJSONSync } from 'fs-extra'; import type { File } from 'shared/test'; import { assetPath, createFolder, getInputDir, getOutputDir } from '../../../shared/test/index'; -import { mipmapCompress } from '@play-co/assetpack-plugin-mipmap-compress'; import { texturePackerCompress } from '../src/texturePackerCompress'; +import { compress, mipmap } from '@play-co/assetpack-plugin-image'; const pkg = 'texture-packer'; @@ -56,15 +56,13 @@ describe('Texture Packer All', () => resolutions: { default: 1, low: 0.5 }, }, }), - mipmapCompress({ - mipmap: { - resolutions: { default: 1, low: 0.5 }, - }, - compress: { - png: true, - jpg: true, - webp: true, - } + mipmap({ + resolutions: { default: 1, low: 0.5 }, + }), + compress({ + png: true, + jpg: true, + webp: true, }), texturePackerCompress({ png: true,