!1 package init

From: @zhanghua1831
Reviewed-by: @solarhu
Signed-off-by: @solarhu
This commit is contained in:
openeuler-ci-bot 2020-09-11 21:34:47 +08:00 committed by Gitee
commit 4271392d3d
3 changed files with 65 additions and 0 deletions

BIN
0.3.2.tar.gz Normal file

Binary file not shown.

61
nodejs-type-check.spec Normal file
View File

@ -0,0 +1,61 @@
%{?nodejs_find_provides_and_requires}
%global packagename type-check
%global bootstrap 1
%global enable_tests 0
Name: nodejs-type-check
Version: 0.3.2
Release: 1
Summary: Allows you to check the types of JavaScript values at runtime
License: MIT
URL: https://github.com/gkz/type-check
Source0: https://github.com/gkz/type-check/archive/%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging npm(prelude-ls)
%if 0%{?enable_tests}
BuildRequires: mocha
%endif
%if !0%{?bootstrap}
BuildRequires: npm(LiveScript)
%endif
%description
type-check allows you to check the types of JavaScript values at runtime with a
Haskell like type syntax.
%prep
%autosetup -n type-check-%{version}
%build
%if !0%{?bootstrap}
%{_bindir}/echo -e "\e[102m -=#=- Building from source -=#=- \e[0m"
rm -rf ./lib/
mkdir ./lib/
%{_bindir}/lsc --compile package.json.ls
%{_bindir}/lsc --output lib --bare --compile src/*.ls
rm -rf ./node_modules/
%endif
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json lib/ \
%{buildroot}%{nodejs_sitelib}/%{packagename}
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/mocha -R dot --ui tdd --compilers ls:LiveScript
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif
%files
%{!?_licensedir:%global license %doc}
%doc *.md
%license LICENSE
%{nodejs_sitelib}/%{packagename}
%changelog
* Tue Aug 11 2020 zhanghua <zhanghua40@huawei.com> - 0.3.2-1
- package init

4
nodejs-type-check.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: gkz/type-check
tag_pattern: "^"
seperator: "."