# spec file for package nodejs-nodejs-ansi-regex
%global commit 47fb974630af70998157b30fad6eb5e5bd7c7cd6
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global npm_name ansi-regex
%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-ansi-regex
Version: 1.1.1
Release: 1%{?dist}
Summary: Regular expression for matching ANSI escape codes
Url: https://github.com/sindresorhus/ansi-regex
Source0: https://github.com/sindresorhus/ansi-regex/archive/%{commit}/ansi-regex-%{commit}.tar.gz
License: MIT
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-devel
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(mocha)
%endif
%description
Regular expression for matching ANSI escape codes
%prep
%setup -q -n %{npm_name}-%{commit}
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pr package.json index.js \
%{buildroot}%{nodejs_sitelib}/%{npm_name}
%{nodejs_symlink_deps}
%if 0%{?enable_tests}
%check
%{nodejs_symlink_deps} --check
mocha test/test.js
#node test/viewCodes.js
%endif
%files
%{nodejs_sitelib}/ansi-regex
%doc readme.md
%license license
%changelog
* Wed May 13 2015 Zuzana Svetlikova <zsvetlik@redhat.com> - 1.1.1-1
- Initial build