Skip to content

Commit e3ba8d4

Browse files
committed
Build: Whitespace target, removes BOM and strips trailing whitespace
1 parent 4f8e2db commit e3ba8d4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,17 @@ themes-download:
185185
@@echo "Building ${DIST_DIR}/jquery-ui-themes-${VERSION}.zip"
186186
@@cd ${DIST_DIR} ; zip -r jquery-ui-themes-${VERSION}.zip jquery-ui-themes-${VERSION}
187187

188+
# strips BOM / trailling whitespaces
189+
whitespace:
190+
@@echo "Stripping BOM / Trailing Whitespace from source files"
191+
@@for file in $$(find ui -name \*.js;find themes -name \*.css) ; \
192+
do perl -pe 's/^\xEF\xBB\xBF//s;s/\s+$$/\n/g' < $$file > $$file.tmp ; \
193+
rm $$file ; \
194+
mv $$file.tmp $$file ; \
195+
done
196+
@@echo "Done, showing git status"
197+
git status
198+
188199
zip:
189200
@@echo "Zipping release"
190201
@@rm ${DIST_DIR}/${RELEASE}.zip || true

0 commit comments

Comments
 (0)