45 lines
1.2 KiB
RPMSpec
45 lines
1.2 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 0
|
|
Name: nodejs-json-stringify-safe
|
|
Version: 5.0.1
|
|
Release: 1
|
|
Summary: JSON.stringify that handles circular references
|
|
License: BSD
|
|
URL: https://github.com/isaacs/json-stringify-safe
|
|
Source0: https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-%{version}.tgz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(mocha) npm(must) npm(sinon)
|
|
%endif
|
|
%description
|
|
This module provides functionality similar to JavaScript's JSON.stringify, but
|
|
it doesn't blow up when it encounters circular references.
|
|
|
|
%prep
|
|
%setup -q -n package
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/json-stringify-safe
|
|
cp -pr stringify.js package.json %{buildroot}%{nodejs_sitelib}/json-stringify-safe
|
|
%nodejs_symlink_deps
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%__nodejs -e "require('./')"
|
|
%if 0%{?enable_tests}
|
|
%__nodejs test.js
|
|
%endif
|
|
|
|
%files
|
|
%doc README.md CHANGELOG.md
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/json-stringify-safe
|
|
|
|
%changelog
|
|
* Mon Aug 17 2020 wutao <wutao61@huawei.com> - 5.0.1-1
|
|
- Package init
|