package init

This commit is contained in:
zhanghua1831 2020-08-28 11:57:43 +08:00
parent 5e572b2a88
commit cacd2aa4d3
6 changed files with 112 additions and 0 deletions

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

@ -0,0 +1,73 @@
%{?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://registry.npmjs.org/type-check/-/type-check-%{version}.tgz
#git clone https://github.com/gkz/type-check
#cd type-check
#git archive --prefix='test/' --format=tar ${gittag}:test/ \
# | bzip2 > "$pwd"/tests-${tag}.tar.bz2
Source1: tests-%{version}.tar.bz2
#git archive --prefix='src/' --format=tar ${gittag}::src/ \
#| bzip2 > "$pwd"/src-${tag}.tar.bz2
Source2: src-%{version}.tar.bz2
Source11: https://raw.githubusercontent.com/gkz/type-check/%{version}/package.json.ls
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
%setup -q -n package
%setup -q -T -D -a 1 -n package
%setup -q -T -D -a 2 -n package
cp -p %{SOURCE11} .
%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: "."

35
package.json.ls Normal file
View File

@ -0,0 +1,35 @@
name: 'type-check'
version: '0.3.2'
author: 'George Zahariev <z@georgezahariev.com>'
description: 'type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.'
homepage: 'https://github.com/gkz/type-check'
keywords:
'type'
'check'
'checking'
'library'
files:
'lib'
'README.md'
'LICENSE'
main: './lib/'
bugs: 'https://github.com/gkz/type-check/issues'
license: 'MIT'
engines:
node: '>= 0.8.0'
repository:
type: 'git'
url: 'git://github.com/gkz/type-check.git'
scripts:
test: "make test"
dependencies:
'prelude-ls': '~1.1.2'
dev-dependencies:
livescript: '~1.4.0'
mocha: '~2.3.4'
istanbul: '~0.4.1'
browserify: '~12.0.1'

BIN
src-0.3.2.tar.bz2 Normal file

Binary file not shown.

BIN
tests-0.3.2.tar.bz2 Normal file

Binary file not shown.

BIN
type-check-0.3.2.tgz Normal file

Binary file not shown.