package init

This commit is contained in:
wangchong1995924 2020-08-20 11:51:14 +08:00
parent 8a6f95b248
commit 0fdca5b1c7
3 changed files with 53 additions and 0 deletions

BIN
nodejs-ms-2.0.0.tar.gz Normal file

Binary file not shown.

49
nodejs-ms.spec Normal file
View File

@ -0,0 +1,49 @@
%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-ms
Version: 2.0.0
Release: 1
Summary: Tiny milliseconds conversion utility for Node.js
License: MIT
URL: https://www.npmjs.com/package/ms
Source0: https://github.com/zeit/ms/archive/%{version}/nodejs-ms-%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(expect.js) npm(mocha)
%endif
%description
This module is a tiny milliseconds conversion utility for Node.js.
It does the following:
- If a number is supplied to ms, a string with a unit is returned.
- If a string that contains the number is supplied, it returns it as a
number (e.g: it returns 100 for '100').
- If you pass a string with a number and a valid unit, the number of
equivalent milliseconds is returned.
%prep
%autosetup -n ms-%{version}
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/ms
cp -pr package.json index.js \
%{buildroot}%{nodejs_sitelib}/ms
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/mocha/bin/mocha tests.js
%endif
%files
%doc readme.md
%license license.md
%{nodejs_sitelib}/ms
%changelog
* Thu Aug 20 2020 wangchong <wangchong56@huawei.com> - 2.0.0-1
- package init

4
nodejs-ms.yaml Normal file
View File

@ -0,0 +1,4 @@
version-control: github
src_repo: vercel/ms
tag_prefix: "^"
seperator: "."