46 lines
1.1 KiB
RPMSpec
46 lines
1.1 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 0
|
|
Name: nodejs-strip-ansi
|
|
Version: 3.0.1
|
|
Release: 1
|
|
Summary: Strip ANSI escape codes (used for colorizing strings in the terminal)
|
|
License: MIT
|
|
URL: https://github.com/chalk/strip-ansi
|
|
Source0: https://github.com/chalk/strip-ansi/archive/v%{version}/strip-ansi-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
BuildRequires: npm(ansi-regex)
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(ava)
|
|
%endif
|
|
%description
|
|
%{summary}.
|
|
|
|
%prep
|
|
%autosetup -p 1 -n strip-ansi-%{version}
|
|
rm -rf node_modules
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/strip-ansi
|
|
cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/strip-ansi
|
|
%nodejs_symlink_deps
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%__nodejs -e "require('./')"
|
|
%if 0%{?enable_tests}
|
|
%{nodejs_sitelib}/ava/cli.js
|
|
%endif
|
|
|
|
%files
|
|
%doc readme.md
|
|
%license license
|
|
%{nodejs_sitelib}/strip-ansi
|
|
|
|
%changelog
|
|
* Wed Aug 12 2020 wangyue <wangyue92@huawei.com> - 3.0.1-1
|
|
- package init
|