<commit_before>#!psgi
use 5.10.0;
use strict;
use warnings;
use lib::xi;
use Fatal              qw(chdir);
use Cwd                qw(getcwd abs_path);
use File::Basename     qw(dirname);
use File::Find         qw(find);
use String::ShellQuote qw(shell_quote);
use Plack::App::Directory;
use Plack::Builder;

my $root = abs_path(dirname(__FILE__));

my $main = do {
    local $/;
    <DATA>;
};
close DATA;

my $js  = Plack::App::Directory->new({root => "$root/js"})->to_app();
my $css = Plack::App::Directory->new({root => "$root/css"})->to_app();

mkdir "$root/js";
mkdir "$root/css";

my $build = abs_path("./node_modules/browserbuild/bin/browserbuild");

builder {
    mount '/css' => $css;
    mount '/js'  => sub {
        my @files;
        find {
            no_chdir => 1,
            wanted   => sub {<commit_msg>Remove dependency on lib::xi<commit_after>#!psgi
use 5.10.0;
use strict;
use warnings;
use Fatal              qw(chdir);
use Cwd                qw(getcwd abs_path);
use File::Basename     qw(dirname);
use File::Find         qw(find);
use String::ShellQuote qw(shell_quote);
use Plack::App::Directory;
use Plack::Builder;

my $root = abs_path(dirname(__FILE__));

my $main = do {
    local $/;
    <DATA>;
};
close DATA;

my $js  = Plack::App::Directory->new({root => "$root/js"})->to_app();
my $css = Plack::App::Directory->new({root => "$root/css"})->to_app();

mkdir "$root/js";
mkdir "$root/css";

my $build = abs_path("./node_modules/browserbuild/bin/browserbuild");

builder {
    mount '/css' => $css;
    mount '/js'  => sub {
        my @files;
        find {
            no_chdir => 1,
            wanted   => sub {
{'fraction_non_alphanumeric': 0.18408262454434993, 'fraction_numerical': 0.006075334143377886, 'mean_word_length': 2.9214285714285713, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5963339', 'n_tokens_mistral': 606, 'n_tokens_neox': 587, 'n_words': 137}