diff --git a/nodejs-ms-2.0.0.tar.gz b/nodejs-ms-2.0.0.tar.gz new file mode 100644 index 0000000..32b9dbe Binary files /dev/null and b/nodejs-ms-2.0.0.tar.gz differ diff --git a/nodejs-ms.spec b/nodejs-ms.spec new file mode 100644 index 0000000..95f95b2 --- /dev/null +++ b/nodejs-ms.spec @@ -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 - 2.0.0-1 +- package init diff --git a/nodejs-ms.yaml b/nodejs-ms.yaml new file mode 100644 index 0000000..390623f --- /dev/null +++ b/nodejs-ms.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: vercel/ms +tag_prefix: "^" +seperator: "."