!1 package init

Merge pull request !1 from Causeway_Bay/master
This commit is contained in:
openeuler-ci-bot 2020-08-22 12:43:35 +08:00 committed by Gitee
commit 3ba1e2bef1
3 changed files with 47 additions and 0 deletions

43
nodejs-package.spec Normal file
View File

@ -0,0 +1,43 @@
%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-package
Version: 1.0.1
Release: 1
Summary: Provides an easy way to export package.json data
License: MIT
URL: https://github.com/vesln/package
Source0: http://registry.npmjs.org/package/-/package-%{version}.tgz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(mocha) npm(should)
%endif
%description
%{summary}.
%prep
%setup -q -n package
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/package
cp -pr package.json lib/ \
%{buildroot}%{nodejs_sitelib}/package
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
NODE_ENV=test %{nodejs_sitelib}/mocha/bin/mocha -R spec --require should \
$(find test -iname '*.test.js')
%endif
%files
%doc Readme.md examples/
%{nodejs_sitelib}/package
%changelog
* Thu Aug 20 2020 wangchong <wangchong56@huawei.com> - 1.0.1-1
- package init

4
nodejs-package.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: vesln/package
tag_prefix: ^
seperator: .

BIN
package-1.0.1.tgz Normal file

Binary file not shown.