File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/theme/bin/generate-default-ramps Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 22 * External dependencies
33 */
44import { writeFile } from 'node:fs/promises' ;
5- import { join } from 'node:path' ;
5+ import { dirname , join } from 'node:path' ;
6+ import { fileURLToPath } from 'node:url' ;
67
78/**
89 * Internal dependencies
@@ -13,6 +14,8 @@ import {
1314 buildAccentRamp ,
1415} from '../../src/color-ramps/index.ts' ;
1516
17+ const __dirname = dirname ( fileURLToPath ( import . meta. url ) ) ;
18+
1619const bgRamp = buildBgRamp ( DEFAULT_SEED_COLORS . bg ) ;
1720const accentRamps = Object . fromEntries (
1821 [ ...Object . entries ( DEFAULT_SEED_COLORS ) ]
@@ -26,7 +29,7 @@ const accentRamps = Object.fromEntries(
2629const ramps = { bg : bgRamp , ...accentRamps } ;
2730
2831const outputPath = join (
29- import . meta . dirname ,
32+ __dirname ,
3033 '../../src/color-ramps/lib/default-ramps.ts'
3134) ;
3235
You can’t perform that action at this time.
0 commit comments