diff --git a/node-require-directory-cc71c23.tar.gz b/node-require-directory-cc71c23.tar.gz new file mode 100644 index 0000000..f49d4d5 Binary files /dev/null and b/node-require-directory-cc71c23.tar.gz differ diff --git a/nodejs-require-directory.spec b/nodejs-require-directory.spec new file mode 100644 index 0000000..5897e5d --- /dev/null +++ b/nodejs-require-directory.spec @@ -0,0 +1,49 @@ +%{?nodejs_find_provides_and_requires} +%global enable_tests 1 +%global srcname require-directory +%global commit0 cc71c23dd0c16cefd26855303c16ca1b9b50a36d +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global owner troygoode +Name: nodejs-%{srcname} +Version: 2.1.1 +Release: 1 +Summary: Recursively iterates over specified directory, require()'ing each file +License: MIT +URL: https://github.com/%{owner}/node-%{srcname} +Source0: https://github.com/%{owner}/node-%{srcname}/archive/%{commit0}.tar.gz#/node-%{srcname}-%{shortcommit0}.tar.gz +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch +BuildRequires: nodejs-packaging +%if 0%{?enable_tests} +BuildRequires: npm(mocha) +%endif +%description +%{summary}. + +%prep +%setup -qn node-%{srcname}-%{commit0} +rm -rf node_modules + +%build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} +cp -pr package.json *.js \ + %{buildroot}%{nodejs_sitelib}/%{srcname} +%nodejs_symlink_deps +%if 0%{?enable_tests} + +%check +%nodejs_symlink_deps --check +mocha +%endif + +%files +%{!?_licensedir:%global license %doc} +%doc README.markdown +%license LICENSE +%{nodejs_sitelib}/%{srcname} + +%changelog +* Tue Aug 18 2020 wangyue - 2.1.1-1 +- package init diff --git a/nodejs-require-directory.yaml b/nodejs-require-directory.yaml new file mode 100644 index 0000000..4e2a33c --- /dev/null +++ b/nodejs-require-directory.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/troygoode/node-require-directory +version_control: github +src_repo: troygoode/node-require-directory +tag_prefix: "^" +seperator: ""