2011-08-03 10:09:28 +00:00
|
|
|
#
|
2015-04-14 06:01:36 +00:00
|
|
|
# spec file for package perl-JavaScript-Minifier
|
2011-08-03 10:09:28 +00:00
|
|
|
#
|
2015-04-14 06:01:36 +00:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-08-03 10:09:28 +00:00
|
|
|
#
|
|
|
|
# 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 http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2015-04-14 06:01:36 +00:00
|
|
|
|
2011-08-03 10:09:28 +00:00
|
|
|
Name: perl-JavaScript-Minifier
|
2015-04-14 06:01:36 +00:00
|
|
|
Version: 1.13
|
|
|
|
Release: 0
|
2011-08-03 10:09:28 +00:00
|
|
|
%define cpan_name JavaScript-Minifier
|
|
|
|
Summary: Perl extension for minifying JavaScript code
|
2015-04-14 06:01:36 +00:00
|
|
|
License: Artistic-1.0 or GPL-1.0+
|
2011-08-03 10:09:28 +00:00
|
|
|
Group: Development/Libraries/Perl
|
2015-04-14 06:01:36 +00:00
|
|
|
Url: http://search.cpan.org/dist/JavaScript-Minifier/
|
|
|
|
Source: http://www.cpan.org/authors/id/Z/ZO/ZOFFIX/%{cpan_name}-%{version}.tar.gz
|
2011-08-03 10:09:28 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
2015-04-14 06:01:36 +00:00
|
|
|
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.
|
2011-08-03 10:09:28 +00:00
|
|
|
|
2015-04-14 06:01:36 +00:00
|
|
|
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.
|
2011-08-03 10:09:28 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%{__make} test
|
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(-,root,root,755)
|
2015-04-14 06:01:36 +00:00
|
|
|
%doc Changes examples LICENSE README README.md xt
|
2011-08-03 10:09:28 +00:00
|
|
|
|
|
|
|
%changelog
|