%{?nodejs_find_provides_and_requires} %global packagename dedent # tests missing due to missing npm(jest) %global enable_tests 0 Name: nodejs-dedent Version: 0.7.0 Release: 1%{?dist} Summary: An ES6 string tag that strips indentation from multi-line strings License: MIT URL: https://github.com/dmnd/dedent Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(jest) %endif %description An ES6 string tag that strips indentation from multi-line strings %prep %autosetup -n package %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json dist/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/jest %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc README.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Fri May 5 2017 Jared Smith - 0.7.0-1 - Initial packaging