-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.PL
More file actions
38 lines (29 loc) · 732 Bytes
/
Makefile.PL
File metadata and controls
38 lines (29 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use ExtUtils::MakeMaker;
use YAML;
my $config = YAML::LoadFile((glob('./plugins/*/config.yaml'))[0]);
my $version = $config->{version};
use Getopt::Long 'GetOptions';
GetOptions('version=s' => \$version);
WriteMakefile(
NAME => $config->{name},
VERSION => $version,
SKIP => [qw(distdir)],
DISTNAME => 'mt-plugin-' . $config->{name},
);
sub MY::top_targets {
<< 'Makefile';
npm-install:
npm ci
npm-build:
npm run build
build-js: npm-install npm-build
build: build-js
manifest : build
create_distdir :
$(RM_RF) $(DISTVNAME)
$(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
distdir : create_distdir
$(NOECHO) $(NOOP)
Makefile
}