Skip to content

Commit

Permalink
Merge pull request #7 from uncenter/refactor/justfile-and-templates
Browse files Browse the repository at this point in the history
refactor: use `whiskers.filename` instead of redirection
  • Loading branch information
gabrielmagno authored May 27, 2024
2 parents a99a62f + 41a736c commit 367d336
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
3 changes: 2 additions & 1 deletion index.tera
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
whiskers:
version: "2.0.0"
version: "2.2.0"
filename: "src/index.ts"
---
import {
JupyterFrontEnd,
Expand Down
5 changes: 3 additions & 2 deletions jupyterlab.tera
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
whiskers:
version: "2.0.0"
version: "2.2.0"
filename: "src/palettes.ts"
---
export class CatppuccinPalettes {
setConfigColors(brandColor: string, accentColor: string) {
Expand All @@ -17,7 +18,7 @@ export class CatppuccinPalettes {
{%- for id, flavor in flavors %}

setColors{{flavor.name | slugify | capitalize}}() {
{%- for name, color in flavor.colors -%}
{%- for name, color in flavor.colors %}
document.documentElement.style.setProperty('--ctp-plt-{{name}}', '#{{color.hex}}');
{%- endfor %}
}
Expand Down
23 changes: 6 additions & 17 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
# Print out all recipes when running `just`
_default:
@just --list
@just --list

# Variables
output := "src"
whiskers_cmd := "whiskers"

# Create the output directory
setup:
mkdir -p {{output}}

# Remove all files in the output directory
clean:
rm -fv {{output}}/*
rm -fv src/*

# Generate all flavors
all: setup
{{whiskers_cmd}} jupyterlab.tera > {{output}}/palettes.ts
{{whiskers_cmd}} index.tera > {{output}}/index.ts
jlpm run prettier
build:
whiskers jupyterlab.tera
whiskers index.tera
jlpm run prettier

0 comments on commit 367d336

Please sign in to comment.