%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-detective
Version: 2.1.2
Release: 2%{?dist}
Summary: Node.js module to find all calls to require()
License: MIT
Group: System Environment/Libraries
URL: https://github.com/substack/node-detective
Source0: http://registry.npmjs.org/detective/-/detective-%{version}.tgz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(escodegen)
BuildRequires: npm(esprima)
BuildRequires: npm(tap)
%endif
%description
Node.js module to find all calls to require(), no matter how crazily nested,
using a proper walk of the AST.
%prep
%setup -q -n package
%nodejs_fixdep esprima '~1.0'
%nodejs_fixdep escodegen '~0.0.15'
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/detective
cp -pr package.json index.js \
%{buildroot}%{nodejs_sitelib}/detective
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%tap test/*.js
%endif
%files
%doc LICENSE readme.markdown example/
%{nodejs_sitelib}/detective
%changelog
* Wed Jul 17 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.1.2-2
- enable tests
* Wed May 29 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.1.2-1
- update to upstream release 2.1.2
* Tue Feb 05 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.1-1
- initial package