aotds-docks/scripts/prettier

17 lines
279 B
Plaintext
Raw Normal View History

2020-07-19 20:21:28 +00:00
#!/usr/bin/env perl
use strict;
# check by default
my $mode = '-c';
my @files = grep {
$_ ne '--fix'or not ($mode = '--write');
} @ARGV;
@files = qw/ src / unless @files;
@files = grep { !/\.gitignore/ } @files;
exec 'prettier', '--plugin-search-dir=.', $mode, @files;