init package
This commit is contained in:
parent
654d6086c1
commit
b9ecdf2f4f
Binary file not shown.
@ -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
11
test.js
@ -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
BIN
v2.0.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user