Skip to content

Commit

Permalink
nix: install prettier, also ignore zig-cache/out
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Sep 28, 2023
1 parent a0a8901 commit 779611c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # Check out repo so we can lint it
- uses: actionsx/prettier@v3
- uses: cachix/install-nix-action@v23
with:
args: --check .
nix_path: nixpkgs=channel:nixos-unstable
- name: prettier check
run: nix develop -c prettier --check .
8 changes: 5 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Docs: https://prettier.io/docs/en/ignore.html
flake.lock
vendor/
# macos is managed by XCode GUI
macos/
**/*.html
flake.lock
zig-cache/
zig-out/

# macos is managed by XCode GUI
macos/
6 changes: 3 additions & 3 deletions example/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ fetch(url.href)
group_add_face(
group,
0 /* regular */,
deferred_face_new(font_name.ptr, font_name.len, 0 /* text */),
deferred_face_new(font_name.ptr, font_name.len, 0 /* text */)
);
group_add_face(
group,
0 /* regular */,
deferred_face_new(font_name.ptr, font_name.len, 1 /* emoji */),
deferred_face_new(font_name.ptr, font_name.len, 1 /* emoji */)
);

// Initialize our sprite font, without this we just use the browser.
Expand Down Expand Up @@ -168,7 +168,7 @@ fetch(url.href)
group_cache,
cp,
0,
-1 /* best choice */,
-1 /* best choice */
);
group_cache_render_glyph(group_cache, font_idx, cp, -1);

Expand Down
4 changes: 4 additions & 0 deletions nix/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, glxinfo
, ncurses
, nodejs
, nodePackages
, parallel
, pkg-config
, python3
Expand Down Expand Up @@ -76,6 +77,9 @@ in mkShell rec {
# For web and wasm stuff
nodejs

# Linting
nodePackages.prettier

# Testing
parallel
python3
Expand Down

0 comments on commit 779611c

Please sign in to comment.