Commit graph

10 commits

Author SHA1 Message Date
Colin Caine
a58f8a3439 scripts/pretty warn when we modify working copy 2018-08-29 11:32:07 +01:00
Colin Caine
8387846cda scripts/pretty prettify working tree copy if it matches staged version 2018-08-29 11:24:34 +01:00
Colin Caine
093f065580 scripts/pretty no longer modify working tree
Trying to avoid race conditions with your editor both in reading the
working tree and modifying the index (git staging area).
2018-08-29 10:34:03 +01:00
William G Hatch
e77e2a07fb use /usr/bin/env to find bash 2018-08-24 13:38:49 -06:00
glacambre
54faf82428
scripts/{pretty,common}: Fix pretty failing on multiple files
When trying to run scripts/pretty with multiple ugly files staged, the
for loop would treat two space-separated file names as a single file
name. This prevented pretty from working on my machine.

I fixed this issue by making cachedJS() (renamed to cachedFiles since it
returns more than js files) return file names as a newline-separated
list and using IFS=$'\n' to split the filenames on this character.
2018-06-03 16:08:45 +02:00
Colin Caine
d35e0c3411 Clarify movement message 2018-05-21 16:34:39 +01:00
Colin Caine
0d7fdb1abf Save one intermediate file 2018-05-21 16:31:50 +01:00
Colin Caine
6e44bef6bd Teach lint,pretty to operate on staged copy
Gets a bit crazy.
2018-05-21 16:24:52 +01:00
Colin Caine
ad261b2e4f Fix {pretty,lint} when staging more than one file 2018-05-21 15:30:57 +01:00
Colin Caine
d28fc7f0f6 Add npm run {lint,pretty}
Lint is an alias to hooks/pre-commit. Code shared in scripts/common.
2018-05-18 16:03:11 +01:00