|
Jared K. Smith |
14c2cf2 |
%{?nodejs_find_provides_and_requires}
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
%global packagename is-arrow-function
|
|
Jared K. Smith |
14c2cf2 |
%global enable_tests 1
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
Name: nodejs-is-arrow-function
|
|
Jared K. Smith |
14c2cf2 |
Version: 2.0.3
|
|
Jared K. Smith |
14c2cf2 |
Release: 1%{?dist}
|
|
Jared K. Smith |
14c2cf2 |
Summary: Determine if a function is an ES6 arrow function or not
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
License: MIT
|
|
Jared K. Smith |
14c2cf2 |
URL: https://github.com/ljharb/is-arrow-function.git
|
|
Jared K. Smith |
14c2cf2 |
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
|
|
Jared K. Smith |
14c2cf2 |
# The test files are not included in the npm tarball.
|
|
Jared K. Smith |
14c2cf2 |
# Source{1-9} are generated by running Source10, which pulls from the upstream
|
|
Jared K. Smith |
14c2cf2 |
# version control repository.
|
|
Jared K. Smith |
14c2cf2 |
Source1: tests-%{version}.tar.bz2
|
|
Jared K. Smith |
14c2cf2 |
Source10: dl-tests.sh
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
BuildArch: noarch
|
|
Jared K. Smith |
14c2cf2 |
%if 0%{?fedora} >= 19
|
|
Jared K. Smith |
14c2cf2 |
ExclusiveArch: %{nodejs_arches} noarch
|
|
Jared K. Smith |
14c2cf2 |
%else
|
|
Jared K. Smith |
14c2cf2 |
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
Jared K. Smith |
14c2cf2 |
%endif
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
BuildRequires: nodejs-packaging
|
|
Jared K. Smith |
14c2cf2 |
BuildRequires: npm(is-callable)
|
|
Jared K. Smith |
14c2cf2 |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
14c2cf2 |
BuildRequires: npm(make-arrow-function)
|
|
Jared K. Smith |
14c2cf2 |
BuildRequires: npm(tape)
|
|
Jared K. Smith |
14c2cf2 |
%endif
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
%description
|
|
Jared K. Smith |
14c2cf2 |
Determine if a function is an ES6 arrow function or not.
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
%prep
|
|
Jared K. Smith |
14c2cf2 |
%autosetup -n package
|
|
Jared K. Smith |
14c2cf2 |
# setup the tests
|
|
Jared K. Smith |
14c2cf2 |
%autosetup -T -D -a 1 -n package
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
%build
|
|
Jared K. Smith |
14c2cf2 |
# nothing to do
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
%install
|
|
Jared K. Smith |
14c2cf2 |
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
14c2cf2 |
cp -pr package.json *.js \
|
|
Jared K. Smith |
14c2cf2 |
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
%nodejs_symlink_deps
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
%check
|
|
Jared K. Smith |
14c2cf2 |
%nodejs_symlink_deps --check
|
|
Jared K. Smith |
14c2cf2 |
%{__nodejs} -e 'require("./")'
|
|
Jared K. Smith |
14c2cf2 |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
14c2cf2 |
%{__nodejs} --es-staging --harmony test/index.js
|
|
Jared K. Smith |
14c2cf2 |
%else
|
|
Jared K. Smith |
14c2cf2 |
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
|
Jared K. Smith |
14c2cf2 |
%endif
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
%files
|
|
Jared K. Smith |
14c2cf2 |
%{!?_licensedir:%global license %doc}
|
|
Jared K. Smith |
14c2cf2 |
%doc *.md
|
|
Jared K. Smith |
14c2cf2 |
%license LICENSE
|
|
Jared K. Smith |
14c2cf2 |
%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
14c2cf2 |
|
|
Jared K. Smith |
14c2cf2 |
%changelog
|
|
Jared K. Smith |
14c2cf2 |
* Mon Jul 4 2016 Jared Smith <jsmith@fedoraproject.org> - 2.0.3-1
|
|
Jared K. Smith |
14c2cf2 |
- Initial packaging
|