From 52444e47a87453091c44dff921e0315854558944 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 24 2017 08:52:53 +0000 Subject: import rh-nodejs8-nodejs-ansi-styles-2.2.1-2.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e511c5f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/ansi-styles-2.2.1.tgz diff --git a/.rh-nodejs8-nodejs-ansi-styles.metadata b/.rh-nodejs8-nodejs-ansi-styles.metadata new file mode 100644 index 0000000..1cda2f5 --- /dev/null +++ b/.rh-nodejs8-nodejs-ansi-styles.metadata @@ -0,0 +1 @@ +b432dd3358b634cf75e1e4664368240533c1ddbe SOURCES/ansi-styles-2.2.1.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..d2af353 --- /dev/null +++ b/SOURCES/test.js @@ -0,0 +1,27 @@ +/*global describe */ +'use strict'; +var assert = require('assert'); +var ansi = require('./ansi-styles'); + +// generates the screenshot +Object.keys(ansi).forEach(function (el) { + var style = ansi[el].open; + + if (el === 'reset') { + return; + } + + if (/^bg[^B]/.test(el)) { + style = ansi.black.open + style; + } + + process.stdout.write(style + el + ansi.reset.open + ansi.reset.close + ' '); +}); + +describe('ansiStyles()', function () { + it('should return ANSI escape codes', function () { + assert.equal(ansi.green.open, '\x1b[32m'); + assert.equal(ansi.bgGreen.open, '\x1b[42m'); + assert.equal(ansi.green.close, '\x1b[39m'); + }); +}); diff --git a/SPECS/nodejs-ansi-styles.spec b/SPECS/nodejs-ansi-styles.spec new file mode 100644 index 0000000..00f78c3 --- /dev/null +++ b/SPECS/nodejs-ansi-styles.spec @@ -0,0 +1,78 @@ +%{?scl:%scl_package nodejs-ansi-styles} +%{!?scl:%global pkg_name %{name}} + +%{?nodejs_find_provides_and_requires} + +%global enable_tests 0 + +Name: %{?scl_prefix}nodejs-ansi-styles +Version: 2.2.1 +Release: 2%{?dist} +Summary: ANSI escape codes for colorizing strings in the terminal +License: MIT +URL: https://github.com/chalk/ansi-styles +Source0: http://registry.npmjs.org/ansi-styles/-/ansi-styles-%{version}.tgz +Source1: https://raw.githubusercontent.com/chalk/ansi-styles/95c59b23be760108b6530ca1c89477c21b258032/test.js + +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: %{?scl_prefix}runtime + +%if 0%{?enable_tests} +BuildRequires: %{?scl_prefix}npm(mocha) +%endif + +%description +%{summary}. + +%prep +%setup -q -n package +cp -p %{SOURCE1} . + +%build +#nothing to do + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/ansi-styles +cp -pr package.json index.js \ + %{buildroot}%{nodejs_sitelib}/ansi-styles + +%nodejs_symlink_deps + + +%if 0%{?enable_tests} + +%check +%nodejs_symlink_deps --check +/usr/bin/mocha +%endif + +%files +%doc license readme.md +%{nodejs_sitelib}/ansi-styles + +%changelog +* Mon Jul 03 2017 Zuzana Svetlikova - 2.2.1-2 +- rh-nodejs8 rebuild + +* Tue Sep 06 2016 Zuzana Svetlikova +- Update, update URL and test + +* Tue Feb 16 2016 Zuzana Svetlikova - 2.1.0-5 +- Use macro in -runtime dependency +- Rebuilt with updated metapackage + +* Thu Jan 07 2016 Tomas Hrcka - 2.1.0-2 +- Enable scl macros + +* Mon Sep 14 2015 Troy Dawson - 2.1.0-4 +- UPdate to 2.1.0 +- Remove tests until all dependencies are built + +* Thu Mar 13 2014 Jamie Nguyen - 1.0.0-1 +- initial package