package init
This commit is contained in:
parent
10f093e76c
commit
58480daf1a
@ -6,9 +6,8 @@ Release: 1
|
|||||||
Summary: Require a module bypassing the cache
|
Summary: Require a module bypassing the cache
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/sindresorhus/require-uncached
|
URL: https://github.com/sindresorhus/require-uncached
|
||||||
Source0: http://registry.npmjs.org/require-uncached/-/require-uncached-%{version}.tgz
|
Source0: https://github.com/sindresorhus/require-uncached/archive/v%{version}.tar.gz
|
||||||
Source1: https://raw.githubusercontent.com/sindresorhus/import-fresh/v%{version}/license
|
Source1: https://raw.githubusercontent.com/sindresorhus/import-fresh/v%{version}/license
|
||||||
Source2: https://raw.githubusercontent.com/sindresorhus/import-fresh/v%{version}/test.js
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
ExclusiveArch: %{nodejs_arches} noarch
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
BuildRequires: nodejs-packaging npm(caller-path) npm(resolve-from)
|
BuildRequires: nodejs-packaging npm(caller-path) npm(resolve-from)
|
||||||
@ -19,9 +18,9 @@ BuildRequires: npm(ava)
|
|||||||
Useful for testing purposes when you need to freshly require a module.
|
Useful for testing purposes when you need to freshly require a module.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n package
|
%autosetup -n import-fresh-%{version}
|
||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
cp -p %{SOURCE1} %{SOURCE2} .
|
cp -p %{SOURCE1} .
|
||||||
%nodejs_fixdep caller-path
|
%nodejs_fixdep caller-path
|
||||||
%nodejs_fixdep resolve-from
|
%nodejs_fixdep resolve-from
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
12
test.js
12
test.js
@ -1,12 +0,0 @@
|
|||||||
import test from 'ava';
|
|
||||||
import m from './';
|
|
||||||
|
|
||||||
test(t => {
|
|
||||||
const id = './fixture';
|
|
||||||
t.is(require(id)(), 1);
|
|
||||||
t.is(require(id)(), 2);
|
|
||||||
t.is(require(id)(), 3);
|
|
||||||
t.is(m(id)(), 1);
|
|
||||||
t.is(m(id)(), 1);
|
|
||||||
t.is(m(id)(), 1);
|
|
||||||
});
|
|
||||||
BIN
v1.0.3.tar.gz
Normal file
BIN
v1.0.3.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user