Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodBoyDigital committed Apr 25, 2024
1 parent e957baa commit 80dbee2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/core/src/utils/generateCacheName.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
import type { AssetPackConfig } from '../config';
import objectHash from 'object-hash';

/**
* Returns a unique name based on the hash generated from the config
* this takes into account the following:
* - pipes and their options,
* - entry and output paths.
* - assetSettings options
* - ignore options
*
* @param options - The asset pack config
* @returns - A unique name based on the hash generated from the config
*/
export function generateCacheName(options: AssetPackConfig)
{
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { pipes, cache, ...configWithoutPlugins } = options;
const { pipes, cache, logLevel, ...configWithoutPlugins } = options;

const optionsToHash: any = {
...configWithoutPlugins,
Expand Down

0 comments on commit 80dbee2

Please sign in to comment.