=============================================================
; `npm` configuration - package.json generation
[JSAN::NPM]
main = lib/Task/Sample/Dist/Core
with the documentation after each release
L<Dist::Zilla::Plugin::JSAN::NPM> - generate `package.json` file for your distribution
L<Dist::Zilla::Plugin::JSAN::NPM::Publish> - publish your distributi
RACT: Generate the `package.json` file, suitable for `npm` package manager
use Moose;
with 'Dist::Zilla::Role::FileGatherer';
use Dist::Zilla::File::FromCode;
use JSON 2;
use Path::Class;
use Fi
$self->add_file(Dist::Zilla::File::FromCode->new({
name => file('package.json') . '',
code => sub {
my $package = {};
ackage->{ bin } = $self->bin if $self->bin;
return JSON->new->utf8(1)->pretty(1)->encode($package)
}
}));
# backward compat with np
Role::FileGatherer';
with 'Dist::Zilla::Role::FileMunger';
use Dist::Zilla::File::FromCode;
use JSON 2;
use Path::Class;
use Capture::Tiny qw/capture/;
has 'npm_root' => (
isa => 'Str',
most {} brackets
$components =~ m/(\{.*\})/s;
$components = $1;
my $deploys = decode_json $components;
foreach my $deploy (keys(%$deploys)) {
$self->concatenate_for_task($dep
a simple JavaScript assignment (to allow inclusion via <script> tag) of the JSON structure.
First level entries of the JSON structure defines a bundles. Each bundle is an array of entries.
Entry, s