!1 Package init
From: @lei_ju Reviewed-by: @solarhu Signed-off-by: @solarhu
This commit is contained in:
commit
50a40b3466
47
nodejs-callsites.spec
Normal file
47
nodejs-callsites.spec
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
%global enable_tests 0
|
||||||
|
%global module_name callsites
|
||||||
|
Name: nodejs-%{module_name}
|
||||||
|
Version: 2.0.0
|
||||||
|
Release: 1
|
||||||
|
Summary: Get callsites from the V8 stack trace API
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/sindresorhus/callsites
|
||||||
|
Source0: https://github.com/sindresorhus/callsites/archive/v%{version}.tar.gz
|
||||||
|
Source1: https://github.com/sindresorhus/callsites/v%{version}/test.js
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
BuildRequires: nodejs-packaging
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: npm(xo) npm(ava)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n callsites-%{version}
|
||||||
|
rm -rf node_modules
|
||||||
|
cp -p %{SOURCE1} .
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
|
||||||
|
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name}
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%{__nodejs} -e 'require("./")'
|
||||||
|
xo && ava
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc readme.md
|
||||||
|
%license license
|
||||||
|
%{nodejs_sitelib}/%{module_name}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Aug 21 2020 leiju <leiju4@huawei.com> - 2.0.0-1
|
||||||
|
- Package init
|
||||||
4
nodejs-callsites.yaml
Normal file
4
nodejs-callsites.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: sindresorhus/callsites
|
||||||
|
tag_prefix: "^v"
|
||||||
|
seperator: "."
|
||||||
7
test.js
Normal file
7
test.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import path from 'path';
|
||||||
|
import test from 'ava';
|
||||||
|
import m from './';
|
||||||
|
|
||||||
|
test(t => {
|
||||||
|
t.is(path.basename(m()[0].getFileName()), 'test.js');
|
||||||
|
});
|
||||||
BIN
v2.0.0.tar.gz
Normal file
BIN
v2.0.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user