Skip to content

Commit

Permalink
build: publish to JSR (#78)
Browse files Browse the repository at this point in the history
* build(deno.json): add jsr info

* refactor(mod.ts): add explicit types

* ci: add publish step to JSR
  • Loading branch information
sgoudham authored Mar 25, 2024
1 parent 563cdbc commit 7e613fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Publish to JSR
run: deno publish

- name: Upload the palette files
env:
GH_TOKEN: ${{ github.token }}
Expand Down
6 changes: 4 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@catppuccin/palette",
"version": "1.1.0",
"exports": "./mod.ts",
"importMap": "./import_map.json",
"exclude": [
"dist"
Expand All @@ -13,6 +16,5 @@
"build:palettes": "deno run -A ./scripts/build_palettes.ts",
"build": "deno task build:npm & deno task build:palettes",
"generate": "deno run -A ./scripts/gen_palette.ts"
},
"version": "1.1.0"
}
}
6 changes: 4 additions & 2 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export type ColorFormat = Readonly<{
/**
* All flavors of Catppuccin
*/
export const flavors = entriesFromObject(definitions)
export const flavors: CatppuccinFlavors = entriesFromObject(definitions)
.reduce((acc, [flavorName, flavor]) => {
acc[flavorName] = {
...flavor,
Expand All @@ -197,4 +197,6 @@ export const flavors = entriesFromObject(definitions)
/**
* A typed `Object.entries()` iterable of all Catppuccin flavors
*/
export const flavorEntries = entriesFromObject(flavors);
export const flavorEntries: Entries<CatppuccinFlavors> = entriesFromObject(
flavors,
);

0 comments on commit 7e613fe

Please sign in to comment.