commit
c2fc4bf5ef
BIN
2.1.11.tar.gz
Normal file
BIN
2.1.11.tar.gz
Normal file
Binary file not shown.
61
nodejs-requirejs.spec
Normal file
61
nodejs-requirejs.spec
Normal file
@ -0,0 +1,61 @@
|
||||
%{?nodejs_find_provides_and_requires}
|
||||
|
||||
%global enable_tests 1
|
||||
|
||||
Name: nodejs-requirejs
|
||||
Version: 2.1.11
|
||||
Release: 1
|
||||
Summary: Node.js adapter for RequireJS, for loading AMD modules
|
||||
License: MIT or BSD
|
||||
URL: https://github.com/jrburke/r.js
|
||||
Source0: https://github.com/jrburke/r.js/archive/%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
BuildRequires: nodejs-packaging
|
||||
|
||||
%description
|
||||
RequireJS is a JavaScript file and module loader. It is optimized for
|
||||
in-browser use, but it can be used in other JavaScript environments,
|
||||
like Rhino and Node. Using a modular script loader like RequireJS will
|
||||
improve the speed and quality of your code.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n r.js-%{version}
|
||||
|
||||
|
||||
%build
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{nodejs_sitelib}/requirejs
|
||||
cp -pr package.json require.js \
|
||||
%{buildroot}%{nodejs_sitelib}/requirejs
|
||||
mkdir -p %{buildroot}%{nodejs_sitelib}/requirejs/bin
|
||||
install -p -D -m0755 dist/r.js \
|
||||
%{buildroot}%{nodejs_sitelib}/requirejs/bin/r.js
|
||||
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
ln -s %{nodejs_sitelib}/requirejs/bin/r.js \
|
||||
%{buildroot}%{_bindir}/r.js
|
||||
|
||||
%nodejs_symlink_deps
|
||||
|
||||
|
||||
%if 0%{?enable_tests}
|
||||
%check
|
||||
pushd tests/
|
||||
%__nodejs ../dist/r.js all.js
|
||||
popd
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%doc LICENSE README.md
|
||||
%{nodejs_sitelib}/requirejs
|
||||
%{_bindir}/r.js
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Aug 19 2020 wangxiao <wangxiao65@huawei.com> - 2.1.11-1
|
||||
- package init
|
||||
5
nodejs-requirejs.yaml
Normal file
5
nodejs-requirejs.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
git_url: https://github.com/jrburke/r.js
|
||||
version_control: github
|
||||
src_repo: jrburke/r.js
|
||||
tag_prefix: ""
|
||||
seperator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user