Package node-uglify-js: Specfile

%define node_module uglify-js

%filter_from_requires /^nodejs.engine./d

Name: node-uglify-js
Version: 3.9.4
Release: alt1

Summary: JavaScript parser, minifier, compressor and beautifier toolkit

License: BSD License
Group: Development/Tools

Packager: Vitaly Lipatov <>

# Source-url:
Source: %name-%version.tar

Source1: %name-development-%version.tar

BuildArch: noarch

BuildRequires(pre): rpm-build-intro >= 1.9.18

BuildRequires: rpm-build-nodejs node
BuildRequires(pre): rpm-macros-nodejs

BuildRequires: node-mocha

Provides: uglifyjs = %version-%release

Provides: nodejs-%node_module = %version-%release
Obsoletes: nodejs-%node_module < %version

#AutoReq: no
AutoProv: no
Requires: node

UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit.

* uglify-js@3 has a simplified API and CLI that is not backwards compatible with uglify-js@2.
* uglify-js only supports JavaScript (ECMAScript 5).
* To minify ECMAScript 2015 or above, transpile using tools like Babel.

%setup -a 1


# check
npm run test

npm prune --production

#npm test

mkdir -p %buildroot%_bindir
ln -sr %buildroot%nodejs_sitelib/%node_module/bin/uglifyjs %buildroot%_bindir/uglifyjs
ln -sr %buildroot%nodejs_sitelib/%node_module/bin/uglifyjs %buildroot%_bindir/uglify-js
mkdir -p %buildroot%nodejs_sitelib/%node_module/
cp -a LICENSE package.json bin/ lib/ tools/ node_modules/ %buildroot/%nodejs_sitelib/%node_module/
rm -rf %buildroot/%nodejs_sitelib/%node_module/test/


* Fri May 29 2020 Vitaly Lipatov <> 3.9.4-alt1
- new version, full spec rewrite

-* Wed Jul 18 2018 Stanislav Levin <> 2.8.22-alt1
-- Initial build for Sisyphus