-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add script to format static/template files
Currently just removes trailing whitespace
- Loading branch information
1 parent
977116d
commit b1b3ab7
Showing
2 changed files
with
8 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
cd "$(dirname -- "$(dirname -- "$(readlink -f -- "$0")")")" | ||
|
||
# Remove trailing whitespace for all JS/CSS/SCSS/txt/JSON/SVG static files | ||
find intranet/static -name vendor -prune -o -type f '(' -name '*.js' -o -name '*.css' -o -name '*.scss' -o -name '*.txt' -o -name '*.json' -o -name '*.svg' ')' -exec sed -i 's/\s\+$//' '{}' ';' | ||
# Remove trailing whitespace for all templates | ||
find intranet/templates -type f -exec sed -i 's/\s\+$//' '{}' ';' |