2020-09-01 13:54:39 +08:00
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
|
|
|
|
|
%global packagename has-ansi
|
|
|
|
|
%global enable_tests 0
|
|
|
|
|
|
|
|
|
|
Name: nodejs-has-ansi
|
|
|
|
|
Version: 2.0.0
|
|
|
|
|
Release: 1
|
|
|
|
|
Summary: Check if a string has ANSI escape codes
|
|
|
|
|
License: MIT
|
2020-09-03 16:24:20 +08:00
|
|
|
URL: https://github.com/chalk/has-ansi
|
2020-09-07 17:30:43 +08:00
|
|
|
Source0: https://github.com/chalk/has-ansi/archive/%{version}.tar.gz
|
2020-09-01 13:54:39 +08:00
|
|
|
|
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
BuildRequires: nodejs-packaging
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
BuildRequires: npm(ava)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Check if a string has ANSI escape codes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-09-03 16:24:20 +08:00
|
|
|
%setup -q -n %{packagename}-%{version}
|
2020-09-01 13:54:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# nothing to do!
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
cp -pr package.json *.js \
|
|
|
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
|
|
|
|
|
%nodejs_symlink_deps
|
|
|
|
|
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
%check
|
|
|
|
|
%nodejs_symlink_deps --check
|
|
|
|
|
%{__nodejs} -e 'require("./")'
|
|
|
|
|
%{__nodejs} test.js
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
%doc *.md
|
|
|
|
|
%license license
|
|
|
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2020-09-03 16:24:20 +08:00
|
|
|
* Thu Sep 3 2020 wangxiao <wangxiao65@huawei.com> - 2.0.0-1
|
2020-09-01 13:54:39 +08:00
|
|
|
- package init
|