diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a6ac3ba --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/is-fullwidth-code-point-1.0.0.tgz diff --git a/.rh-nodejs6-nodejs-is-fullwidth-code-point.metadata b/.rh-nodejs6-nodejs-is-fullwidth-code-point.metadata new file mode 100644 index 0000000..728d246 --- /dev/null +++ b/.rh-nodejs6-nodejs-is-fullwidth-code-point.metadata @@ -0,0 +1 @@ +ef9e31386f031a7f0d643af82fde50c457ef00cb SOURCES/is-fullwidth-code-point-1.0.0.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/test.js b/SOURCES/test.js new file mode 100644 index 0000000..7b32038 --- /dev/null +++ b/SOURCES/test.js @@ -0,0 +1,13 @@ +'use strict'; +var test = require('ava'); +var codePointAt = require('code-point-at'); +var fn = require('./'); + +test(function (t) { + t.assert(fn(codePointAt('あ'))); + t.assert(fn(codePointAt('谢'))); + t.assert(fn(codePointAt('고'))); + t.assert(fn(0x1f251)); + t.assert(!fn(codePointAt('a'))); + t.end(); +}); diff --git a/SPECS/nodejs-is-fullwidth-code-point.spec b/SPECS/nodejs-is-fullwidth-code-point.spec new file mode 100644 index 0000000..8da2b32 --- /dev/null +++ b/SPECS/nodejs-is-fullwidth-code-point.spec @@ -0,0 +1,70 @@ +%{?scl:%scl_package nodejs-is-fullwidth-code-point} +%{!?scl:%global pkg_name %{name}} + +%{?nodejs_find_provides_and_requires} + +%global packagename is-fullwidth-code-point +%global enable_tests 0 +# tests disabed until 'ava' is packaged for Fedora + +Name: %{?scl_prefix}nodejs-is-fullwidth-code-point +Version: 1.0.0 +Release: 2%{?dist} +Summary: Check if given Unicode code point is fullwidth + +License: MIT +URL: https://github.com/sindresorhus/is-fullwidth-code-point +Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz +# The test files are not included in the npm tarball. +Source1: https://raw.githubusercontent.com/sindresorhus/is-fullwidth-code-point/v%{version}/test.js + + +ExclusiveArch: %{nodejs_arches} noarch +BuildArch: noarch + +BuildRequires: %{?scl_prefix}nodejs-devel +BuildRequires: %{?scl_prefix}npm(number-is-nan) +%if 0%{?enable_tests} +BuildRequires: %{?scl_prefix}npm(ava) +BuildRequires: %{?scl_prefix}npm(code-point-at) +%endif + +%description +Check if the character represented by a given Unicode code point is fullwidth + +%prep +%setup -q -n package +# setup the tests +cp -r %{SOURCE1} . + +%build +# nothing to do! + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} +cp -pr package.json index.js \ + %{buildroot}%{nodejs_sitelib}/%{packagename} + +%nodejs_symlink_deps + +#%check +#%nodejs_symlink_deps --check +#%{__nodejs} -e 'require("./")' +#%if 0%{?enable_tests} +#%{__nodejs} test.js +#%else +#%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" +#%endif + +%files +%{!?_licensedir:%global license %doc} +%doc *.md +%license license +%{nodejs_sitelib}/%{packagename} + +%changelog +* Wed Sep 14 2016 Zuzana Svetlikova - 1.0.0-2 +- Built for RHSCL + +* Tue Feb 23 2016 Jared Smith - 1.0.0-1 +- Initial packaging