Skip to content

Commit

Permalink
feat: add script to format static/template files
Browse files Browse the repository at this point in the history
Currently just removes trailing whitespace
  • Loading branch information
anonymoose2 authored and theo-o committed Nov 2, 2019
1 parent 977116d commit b1b3ab7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Ion.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3509,4 +3509,5 @@ scripts/import_fixtures.sh
scripts/make_dark_pattern_images.py
scripts/push_docs.sh
scripts/restart_celery.sh
scripts/static_templates_format.sh
scripts/update_docs_sources.sh
7 changes: 7 additions & 0 deletions scripts/static_templates_format.sh
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\+$//' '{}' ';'

0 comments on commit b1b3ab7

Please sign in to comment.