The package rpms/nodejs-ansi-escapes.git has added or updated architecture specific
content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/nodejs-ansi-escapes.git/commit/?i....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit 1bca44cdbf38752a2a32f01e1dbe4b86ca9309e2
Author: Jared Smith <jsmith(a)fedoraproject.org>
Date: Thu Apr 26 06:37:18 2018 -0400
Initial packaging
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..699189b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/ansi-escapes-3.1.0.tgz
diff --git a/README.md b/README.md
deleted file mode 100644
index 1f3e873..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# nodejs-ansi-escapes
-
-'ANSI escape codes for manipulating the terminal'
\ No newline at end of file
diff --git a/nodejs-ansi-escapes.spec b/nodejs-ansi-escapes.spec
new file mode 100644
index 0000000..68524b4
--- /dev/null
+++ b/nodejs-ansi-escapes.spec
@@ -0,0 +1,65 @@
+%{?nodejs_find_provides_and_requires}
+
+%global packagename ansi-escapes
+
+# the ava test suite is not yet in Fedora
+%global enable_tests 0
+
+Name: nodejs-ansi-escapes
+Version: 3.1.0
+Release: 1%{?dist}
+Summary: ANSI escape codes for manipulating the terminal
+
+License: MIT
+URL:
https://github.com/sindresorhus/ansi-escapes.git
+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/ansi-escapes/v%{version}/t...
+
+
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
+
+BuildRequires: nodejs-packaging
+
+%if 0%{?enable_tests}
+BuildRequires: npm(ava)
+%endif
+
+%description
+ANSI escape codes for manipulating the terminal
+
+
+%prep
+%autosetup -n package
+# setup the tests
+cp -p %{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}
+NODE_ENV=test %{_bindir}/ava
+%else
+%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
+%endif
+
+%files
+%doc *.md
+%license license
+%{nodejs_sitelib}/%{packagename}
+
+%changelog
+* Fri Apr 6 2018 Jared K. Smith <jsmith(a)fedoraproject.org> - 3.1.0-1
+- Initial packaging
diff --git a/sources b/sources
new file mode 100644
index 0000000..ef096fd
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (ansi-escapes-3.1.0.tgz) =
52001bf07f43e350109eefcf6d6942a1f4157275781acd9b0498bd7993f17d4fe182094587748c0cc10d448a9dafb1fa5c59d776892772d141c95b023a8b5357
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..f29b656
--- /dev/null
+++ b/test.js
@@ -0,0 +1,8 @@
+import test from 'ava';
+import m from '.';
+
+test(t => {
+ t.true(Object.keys(m).length > 0);
+ t.is(typeof m.cursorTo, 'function');
+ t.is(m.cursorTo(2, 2), '\u001B[3;3H');
+});