Mojolicious-Plugin-AssetPack-Pipe-ElmLang

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/AssetPack/Pipe/ElmLang.pm  view on Meta::CPAN

            my $tmp = File::Temp->new( SUFFIX => '.js' );
            push @args , '--yes', '--output' , $tmp->filename;
            push @args , '--debug' if $mode eq 'development';

            my $file = $asset->path ? $asset : Mojo::Asset::File->new->add_chunk($asset->content);
            
            push @args , $file->path->to_string;

            $self->run(\@args, undef, undef);

            my $js = do { local(@ARGV, $/) = $tmp; <> };

            $asset->content($store->save(\$js, $attrs))->FROM_JSON($attrs);
        }
    );
}

sub _install_elm {
  my $self = shift;
  my $path = $self->app->home->rel_file('node_modules/.bin/elm-make');
  return $path if -e $path;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.766 second using v1.00-cache-2.02-grep-82fe00e-cpan-c9a218a2bbc )