17 lines
279 B
Perl
Executable File
17 lines
279 B
Perl
Executable File
#!/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;
|