build: publish to JSR (#78)
* build(deno.json): add jsr info * refactor(mod.ts): add explicit types * ci: add publish step to JSR
This commit is contained in:
parent
563cdbccc8
commit
7e613fee08
|
@ -52,6 +52,9 @@ jobs:
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||||
|
|
||||||
|
- name: Publish to JSR
|
||||||
|
run: deno publish
|
||||||
|
|
||||||
- name: Upload the palette files
|
- name: Upload the palette files
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{
|
{
|
||||||
|
"name": "@catppuccin/palette",
|
||||||
|
"version": "1.1.0",
|
||||||
|
"exports": "./mod.ts",
|
||||||
"importMap": "./import_map.json",
|
"importMap": "./import_map.json",
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"dist"
|
"dist"
|
||||||
|
@ -13,6 +16,5 @@
|
||||||
"build:palettes": "deno run -A ./scripts/build_palettes.ts",
|
"build:palettes": "deno run -A ./scripts/build_palettes.ts",
|
||||||
"build": "deno task build:npm & deno task build:palettes",
|
"build": "deno task build:npm & deno task build:palettes",
|
||||||
"generate": "deno run -A ./scripts/gen_palette.ts"
|
"generate": "deno run -A ./scripts/gen_palette.ts"
|
||||||
},
|
}
|
||||||
"version": "1.1.0"
|
|
||||||
}
|
}
|
||||||
|
|
6
mod.ts
6
mod.ts
|
@ -185,7 +185,7 @@ export type ColorFormat = Readonly<{
|
||||||
/**
|
/**
|
||||||
* All flavors of Catppuccin
|
* All flavors of Catppuccin
|
||||||
*/
|
*/
|
||||||
export const flavors = entriesFromObject(definitions)
|
export const flavors: CatppuccinFlavors = entriesFromObject(definitions)
|
||||||
.reduce((acc, [flavorName, flavor]) => {
|
.reduce((acc, [flavorName, flavor]) => {
|
||||||
acc[flavorName] = {
|
acc[flavorName] = {
|
||||||
...flavor,
|
...flavor,
|
||||||
|
@ -197,4 +197,6 @@ export const flavors = entriesFromObject(definitions)
|
||||||
/**
|
/**
|
||||||
* A typed `Object.entries()` iterable of all Catppuccin flavors
|
* A typed `Object.entries()` iterable of all Catppuccin flavors
|
||||||
*/
|
*/
|
||||||
export const flavorEntries = entriesFromObject(flavors);
|
export const flavorEntries: Entries<CatppuccinFlavors> = entriesFromObject(
|
||||||
|
flavors,
|
||||||
|
);
|
||||||
|
|
Loading…
Reference in New Issue