Skip to content

Commit

Permalink
Install culori as development dependency so it gets bundled
Browse files Browse the repository at this point in the history
  • Loading branch information
catuhana committed Jan 4, 2024
1 parent df92c9b commit 700260e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 31 deletions.
1 change: 1 addition & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export default defineBuildConfig({
clean: true,
declaration: true,
externals: ['@unocss/core'],
rollup: { emitCJS: true, inlineDependencies: true },
});
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,18 @@
"prepack": "pnpm build"
},
"dependencies": {
"@catppuccin/palette": "^1.0.1",
"culori": "^3.3.0"
"@catppuccin/palette": "^1.0.1"
},
"devDependencies": {
"@types/culori": "^2.0.4",
"@unocss/core": "^0.58.2",
"culori": "^3.3.0",
"prettier": "^3.1.1",
"typescript": "^5.3.3",
"unbuild": "^2.0.0"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=16"
},
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
}
12 changes: 0 additions & 12 deletions patches/[email protected]

This file was deleted.

16 changes: 5 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/shade.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { formatHex, interpolate } from 'culori/export';
import { useMode, modeHsl, modeRgb, formatHex, interpolate } from 'culori/fn';

import { SHADE_RANGE } from './constants.ts';

import type { ColorFormat } from '@catppuccin/palette';

useMode(modeHsl);
useMode(modeRgb);

export const generateShadePalette = (colour: ColorFormat) => {
let resultObject = {} as Record<keyof typeof SHADE_RANGE | 'DEFAULT', string>;

Expand Down

0 comments on commit 700260e

Please sign in to comment.