File: jspaths.pl

package info (click to toggle)
less.js 3.13.0%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,020 kB
  • sloc: javascript: 23,275; makefile: 12; perl: 11; sh: 6
file content (20 lines) | stat: -rwxr-xr-x 421 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl

use strict;
use warnings;

# We need a parser that tolerates lack of final newline
use YAML::Tiny;

my $data = YAML::Tiny->read($ARGV[0])->[0];

# dig out and expand source files for browser use
my @items = map {
	s,<%= build\.([a-z_]+)\.([a-z_]+) %>,$data->{$1}{$2},;
	s,<%= build\.([a-z_]+) %>,$data->{$1},;
	grep /./, split /[\'\[\], ]+/;
	} @{$data->{browser}};

print join ("\n", @items), "\n";

1;