Blob Blame History Raw
%{?nodejs_find_provides_and_requires}
%global enable_tests 0

Name:       nodejs-mustache
Version:    1.0.0
Release:    2%{?dist}
Summary:    mustache.js is an implementation of the mustache template system in JavaScript
License:    MIT
URL:        https://github.com/janl/mustache.js
Source:     http://registry.npmjs.org/mustache/-/mustache-%{version}.tgz


BuildArch:  noarch

BuildRequires:  nodejs-packaging
ExclusiveArch: %{nodejs_arches} noarch

%if 0%{?enable_tests}
BuildRequires:  npm(mocha)
%endif

%description
An implementation of the mustache template system in JavaScript.Mustache is a logic-less template syntax. It can be used for HTML, config files, source code - anything. It works by expanding tags in a template using values provided in a hash or object.
We call it "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values.

%prep
%setup -q -n package



%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/mustache
cp -pr mustache.js mustache.js.nuspec Rakefile package.json mustache.min.js wrappers/  hooks/ \
    %{buildroot}%{nodejs_sitelib}/mustache
%nodejs_symlink_deps 

%if 0%{?enable_tests}
%check
mocha test
%endif

%files
%doc LICENSE CHANGELOG.md README.md 
%{nodejs_sitelib}/mustache


%changelog
* Fri Feb 06 2015 Anish Patil <apatil@redhat.com> - 1.0.0-2
- Build with few minor changes
* Wed Dec 24 2014 Anish Patil <apatil@redhat.com> - 1.0.0-1
- Upstream has released new version
* Thu Sep 04 2014 Anish Patil <apatil@redhat.com> - 0.8.2-1
- Initial package