diff --git a/nodejs-rechoir.spec b/nodejs-rechoir.spec new file mode 100644 index 0000000..35a019a --- /dev/null +++ b/nodejs-rechoir.spec @@ -0,0 +1,48 @@ +%{?nodejs_find_provides_and_requires} +%global packagename rechoir +%global enable_tests 0 +Name: nodejs-rechoir +Version: 0.6.2 +Release: 1 +Summary: Require any supported file as a node module +License: MIT +URL: https://github.com/tkellen/node-rechoir +Source0: https://github.com/tkellen/node-rechoir/archive/v%{version}.tar.gz +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch +BuildRequires: nodejs-packaging npm(resolve) +%if 0%{?enable_tests} +BuildRequires: mocha npm(require-uncached) +%endif +%description +Require any supported file as a node module. + +%prep +%autosetup -n rechoir-%{version} + +%build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} +cp -pr package.json *.js lib/ \ + %{buildroot}%{nodejs_sitelib}/%{packagename} +%nodejs_symlink_deps + +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +%if 0%{?enable_tests} +NODE_ENV=test %{_bindir}/mocha -R spec +%else +%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" +%endif + +%files +%{!?_licensedir:%global license %doc} +%doc *.md CHANGELOG +%license LICENSE +%{nodejs_sitelib}/%{packagename} + +%changelog +* Sat Aug 22 2020 wangyue - 0.6.2-1 +- package init diff --git a/nodejs-rechoir.yaml b/nodejs-rechoir.yaml new file mode 100644 index 0000000..b3aff68 --- /dev/null +++ b/nodejs-rechoir.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/tkellen/node-rechoir +version_control: github +src_repo: tkellen/node-rechoir +tag_prefix: "^" +seperator: "." diff --git a/v0.6.2.tar.gz b/v0.6.2.tar.gz new file mode 100644 index 0000000..c2dba9f Binary files /dev/null and b/v0.6.2.tar.gz differ