site

A custom static site generator written in C.
git clone https://unitehenry.com/git/site.git
Log | Files | Refs | README

lint (319B)


      1 #!/usr/bin/env bash
      2 clang-format -i src/*
      3 npx prettier --write templates
      4 npx prettier --write static/**/*.css
      5 
      6 # Check if any files in the linted directories were modified
      7 if git diff --name-only | grep -E '^(src/|templates/|static/)' | grep -q .; then
      8   echo "Linting required edits. Files were modified."
      9   exit 1
     10 fi