Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/theme/bin/generate-default-ramps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* External dependencies
*/
import { writeFile } from 'node:fs/promises';
import { join } from 'node:path';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';

/**
* Internal dependencies
Expand All @@ -13,6 +14,8 @@ import {
buildAccentRamp,
} from '../../src/color-ramps/index.ts';

const __dirname = dirname( fileURLToPath( import.meta.url ) );

const bgRamp = buildBgRamp( DEFAULT_SEED_COLORS.bg );
const accentRamps = Object.fromEntries(
[ ...Object.entries( DEFAULT_SEED_COLORS ) ]
Expand All @@ -26,7 +29,7 @@ const accentRamps = Object.fromEntries(
const ramps = { bg: bgRamp, ...accentRamps };

const outputPath = join(
import.meta.dirname,
__dirname,
'../../src/color-ramps/lib/default-ramps.ts'
);

Expand Down
Loading