Skip to content

Commit

Permalink
Merge branch 'chore/cache-buster-plugins' into chore/object-hash-options
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodBoyDigital committed Apr 25, 2024
2 parents 80dbee2 + ebbf8ef commit cd905ad
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/image/test/Compress.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('Compress', () =>
expect(existsSync(`${outputDir}/testJpg.png`)).toBe(false);
});

it.only('should compress png with 1 plugin', async () =>
it('should compress png with 1 plugin', async () =>
{
const testName = 'compress-png-1-plugin';
const inputDir = getInputDir(pkg, testName);
Expand Down
2 changes: 1 addition & 1 deletion packages/spine/src/spineAtlasCacheBuster.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
20 changes: 9 additions & 11 deletions packages/spine/test/spineAtlasAll.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AssetPack } from '@play-co/assetpack-core';
import { compress, mipmap } from '@play-co/assetpack-plugin-image';
import { readFileSync } from 'fs-extra';
import { existsSync, readFileSync } from 'fs-extra';
import { assetPath, createFolder, getInputDir, getOutputDir } from '../../../shared/test';
import { spineAtlasCompress } from '../src/spineAtlasCompress';
import { spineAtlasMipmap } from '../src/spineAtlasMipmap';
Expand Down Expand Up @@ -74,7 +74,7 @@ describe('Spine Atlas All', () =>
expect(rawAtlasWebpHalf.includes('[email protected]')).toBeTruthy();
});

it.only('should correctly create files when Mipmap and CacheBuster are used', async () =>
it('should correctly create files when Mipmap and CacheBuster are used', async () =>
{
const testName = 'spine-atlas-mip-cache-buster';
const inputDir = getInputDir(pkg, testName);
Expand Down Expand Up @@ -106,15 +106,13 @@ describe('Spine Atlas All', () =>
output: outputDir,
cache: false,
pipes: [
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,
webp: true,
jpg: true,
}),
spineAtlasMipmap({
resolutions: { default: 1, low: 0.5 },
Expand Down
2 changes: 1 addition & 1 deletion packages/texture-packer/src/texturePackerCacheBuster.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
18 changes: 8 additions & 10 deletions packages/texture-packer/test/texturePackerAll.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit cd905ad

Please sign in to comment.