!1 package init
From: @wang_yue111 Reviewed-by: @solarhu Signed-off-by: @solarhu
This commit is contained in:
commit
b30bc8fd8b
21
license
Normal file
21
license
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
50
nodejs-require-uncached.spec
Normal file
50
nodejs-require-uncached.spec
Normal file
@ -0,0 +1,50 @@
|
||||
%global enable_tests 0
|
||||
%global module_name require-uncached
|
||||
Name: nodejs-%{module_name}
|
||||
Version: 1.0.3
|
||||
Release: 1
|
||||
Summary: Require a module bypassing the cache
|
||||
License: MIT
|
||||
URL: https://github.com/sindresorhus/require-uncached
|
||||
Source0: https://github.com/sindresorhus/require-uncached/archive/v%{version}.tar.gz
|
||||
Source1: https://raw.githubusercontent.com/sindresorhus/import-fresh/v%{version}/license
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
BuildRequires: nodejs-packaging npm(caller-path) npm(resolve-from)
|
||||
%if 0%{?enable_tests}
|
||||
BuildRequires: npm(ava)
|
||||
%endif
|
||||
%description
|
||||
Useful for testing purposes when you need to freshly require a module.
|
||||
|
||||
%prep
|
||||
%autosetup -n import-fresh-%{version}
|
||||
rm -rf node_modules
|
||||
cp -p %{SOURCE1} .
|
||||
%nodejs_fixdep caller-path
|
||||
%nodejs_fixdep resolve-from
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
|
||||
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name}
|
||||
%nodejs_symlink_deps
|
||||
|
||||
%check
|
||||
%nodejs_symlink_deps --check
|
||||
%{__nodejs} -e 'require("./")'
|
||||
%if 0%{?enable_tests}
|
||||
node test.js
|
||||
%else
|
||||
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc readme.md
|
||||
%license license
|
||||
%{nodejs_sitelib}/%{module_name}
|
||||
|
||||
%changelog
|
||||
* Fri Aug 14 2020 wangyue <wangyue92@huawei.com> - 1.0.3-1
|
||||
- Package init
|
||||
5
nodejs-require-uncached.yaml
Normal file
5
nodejs-require-uncached.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
git_url: https://github.com/sindresorhus/require-uncached
|
||||
version_control: github
|
||||
src_repo: sindresorhus/require-uncached
|
||||
tag_prefix: "^v"
|
||||
seperator: "."
|
||||
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