Add beautifier script and mention it in readme

This commit is contained in:
Olaf Leidinger 2017-11-20 23:32:35 +01:00
parent 790f5cf928
commit 517445f2aa
2 changed files with 14 additions and 0 deletions

View File

@ -43,3 +43,9 @@ A handy zip file can be created using:
Thanks to Thomas Liebetraut for the new build system.
Get the latest version from: https://github.com/tommie-lie/gnome-shell-extensions-template
** Contribution **
Patches are welcome. But please make sure the code you contribute is formated properly.
Please run `beautify-code.sh` before sending pull requests. Therefore, you'll need to install the
python tool `js-beautify`, e.g. via `pip install jsbeautifier`.

8
beautify-code.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
SRC_DIR=$(dirname $0)
echo $SRC_DIR
for fn in "${SRC_DIR}"/src/*.js ; do
js-beautify -t -n -r -j $fn
done