- updated to 1.16 see /usr/share/doc/packages/perl-JavaScript-Minifier/Changes 1.16 2021-03-03 - Fixed parsing of regexp containing unescaped slash (by faf, #12) OBS-URL: https://build.opensuse.org/request/show/876700 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-JavaScript-Minifier?expand=0&rev=5
73 lines
2.5 KiB
RPMSpec
73 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package perl-JavaScript-Minifier
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name JavaScript-Minifier
|
|
Name: perl-JavaScript-Minifier
|
|
Version: 1.16
|
|
Release: 0
|
|
Summary: Perl extension for minifying JavaScript code
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/Z/ZO/ZOFFIX/%{cpan_name}-%{version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This module removes unnecessary whitespace from JavaScript code. The
|
|
primary requirement developing this module is to not break working code: if
|
|
working JavaScript is in input then working JavaScript is output. It is ok
|
|
if the input has missing semi-colons, snips like '++ +' or '12
|
|
.toString()', for example. Internet Explorer conditional comments are
|
|
copied to the output but the code inside these comments will not be
|
|
minified.
|
|
|
|
The ECMAScript specifications allow for many different whitespace
|
|
characters: space, horizontal tab, vertical tab, new line, carriage return,
|
|
form feed, and paragraph separator. This module understands all of these as
|
|
whitespace except for vertical tab and paragraph separator. These two types
|
|
of whitespace are not minimized.
|
|
|
|
For static JavaScript files, it is recommended that you minify during the
|
|
build stage of web deployment. If you minify on-the-fly then it might be a
|
|
good idea to cache the minified file. Minifying static files on-the-fly
|
|
repeatedly is wasteful.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{version}
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes examples README README.md
|
|
%license LICENSE
|
|
|
|
%changelog
|