%{?nodejs_find_provides_and_requires} %global enable_tests 0 %global barename yargs Name: nodejs-yargs Version: 3.2.1 Release: 1 Summary: Light-weight option parsing with an argv hash License: MIT URL: https://www.npmjs.org/package/yargs Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging >= 6 %if 0%{?enable_tests} BuildRequires: npm(hashish) npm(chai) npm(mocha) %endif %description Yargs be a node.js library fer hearties tryin' ter parse optstrings against their will where even the boo box be not enough to coerce them. This here module is fer scallywags lookin' ter plunder all the sunken -shipz of their --treasures thru program usage but be tired of optstrings disincling to acquiesce to yer requests. With yargs, ye be havin' a map that leads straight to yer treasure! Treasure of course, being a simple option hash. %prep %setup -q -n package rm -rf node_modules/ %nodejs_fixdep --caret %nodejs_fixdep wordwrap %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/yargs cp -pr package.json lib index.js \ %{buildroot}%{nodejs_sitelib}/yargs %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check mocha -R nyan %endif %files %doc README.md LICENSE %{nodejs_sitelib}/yargs/ %changelog * Fri Aug 21 2020 wangyue - 3.2.1-1 - package init