init package

This commit is contained in:
root 2020-09-07 17:48:35 +08:00
parent 654d6086c1
commit b9ecdf2f4f
4 changed files with 2 additions and 14 deletions

Binary file not shown.

View File

@ -6,8 +6,7 @@ Release: 1
Summary: Get the path of the caller module Summary: Get the path of the caller module
License: MIT License: MIT
URL: https://github.com/sindresorhus/caller-path URL: https://github.com/sindresorhus/caller-path
Source0: http://registry.npmjs.org/caller-path/-/caller-path-%{version}.tgz Source0: https://github.com/sindresorhus/caller-path/archive/v%{version}.tar.gz
Source1: https://raw.githubusercontent.com/sindresorhus/caller-path/master/test.js
BuildArch: noarch BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging BuildRequires: nodejs-packaging
@ -20,7 +19,7 @@ cached and it will return the first caller module, not necessarily the current
one. one.
%prep %prep
%setup -q -n package %autosetup -n caller-path-%{version}
rm -rf node_modules rm -rf node_modules
cp -p %{SOURCE1} . cp -p %{SOURCE1} .

11
test.js
View File

@ -1,11 +0,0 @@
import path from 'path';
import test from 'ava';
import fixture from './fixture';
import fixture2 from './fixture2';
import fixture3 from './fixture3';
test(t => {
t.is(path.basename(fixture()), 'test.js');
t.is(path.basename(fixture2()), 'test.js');
t.is(path.basename(fixture3()), 'test.js');
});

BIN
v2.0.0.tar.gz Normal file

Binary file not shown.