commit
e2727baedb
BIN
1.0.0.tar.gz
Normal file
BIN
1.0.0.tar.gz
Normal file
Binary file not shown.
44
nodejs-ejs.spec
Normal file
44
nodejs-ejs.spec
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
%{?nodejs_find_provides_and_requires}
|
||||||
|
%global enable_tests 1
|
||||||
|
Name: nodejs-ejs
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 1
|
||||||
|
Summary: Embedded JavaScript templates for Node.js
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/tj/ejs
|
||||||
|
Source0: https://github.com/tj/ejs/archive/%{version}.tar.gz
|
||||||
|
Patch0: nodejs-ejs_fix-should-syntax.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
||||||
|
BuildRequires: nodejs-packaging
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: npm(mocha) npm(should)
|
||||||
|
%endif
|
||||||
|
%description
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n ejs-%{version} -S git
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/ejs
|
||||||
|
cp -pr package.json ejs.js ejs.min.js index.js lib/ \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/ejs
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%{nodejs_sitelib}/mocha/bin/mocha --require should --reporter spec
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc History.md Readme.md examples/
|
||||||
|
%{nodejs_sitelib}/ejs
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Aug 18 2020 Anan Fu <fuanan3@huawei.com> - 1.0.0-1
|
||||||
|
- package init
|
||||||
4
nodejs-ejs.yaml
Normal file
4
nodejs-ejs.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: tj/ejs
|
||||||
|
tag_prefix: "^"
|
||||||
|
seperator: "."
|
||||||
19
nodejs-ejs_fix-should-syntax.patch
Normal file
19
nodejs-ejs_fix-should-syntax.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff --git a/test/ejs.js b/test/ejs.js
|
||||||
|
index acc2da1..28fbf32 100644
|
||||||
|
--- a/test/ejs.js
|
||||||
|
+++ b/test/ejs.js
|
||||||
|
@@ -34,12 +34,12 @@ describe('ejs.compile(str, options)', function(){
|
||||||
|
try {
|
||||||
|
ejs.compile(fixture('fail.ejs'));
|
||||||
|
} catch (err) {
|
||||||
|
- err.message.should.include('compiling ejs');
|
||||||
|
+ err.message.should.containEql('compiling ejs');
|
||||||
|
|
||||||
|
try {
|
||||||
|
ejs.compile(fixture('fail.ejs'), { filename: 'fail.ejs' });
|
||||||
|
} catch (err) {
|
||||||
|
- err.message.should.include('fail.ejs');
|
||||||
|
+ err.message.should.containEql('fail.ejs');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user