From 71d86f5a30bcf286fc40a506d8f6330926c643fc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 22 2016 14:21:51 +0000 Subject: import nodejs010-nodejs-chalk-1.1.1-3.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b252934 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/chalk-1.1.1.tgz diff --git a/.nodejs010-nodejs-chalk.metadata b/.nodejs010-nodejs-chalk.metadata new file mode 100644 index 0000000..cccbfb7 --- /dev/null +++ b/.nodejs010-nodejs-chalk.metadata @@ -0,0 +1 @@ +509afb67066e7499f7eb3535c77445772ae2d019 SOURCES/chalk-1.1.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-chalk.spec b/SPECS/nodejs-chalk.spec new file mode 100644 index 0000000..f343a22 --- /dev/null +++ b/SPECS/nodejs-chalk.spec @@ -0,0 +1,86 @@ +%{?scl:%scl_package nodejs-chalk} +%{!?scl:%global pkg_name %{name}} + +%{?nodejs_find_provides_and_requires} + +# Tests fail inside Koji due to terminal environment. +%global enable_tests 0 + +Name: %{?scl_prefix}nodejs-chalk +Version: 1.1.1 +Release: 3%{?dist} +Summary: Terminal string styling done right +License: MIT +Group: System Environment/Libraries +URL: https://github.com/sindresorhus/chalk +Source0: http://registry.npmjs.org/chalk/-/chalk-%{version}.tgz +Source1: https://raw.github.com/sindresorhus/chalk/0a33a270b1e00ae4dea31b8ca368056d6823a148/test.js + +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: nodejs010-runtime + +%if 0%{?enable_tests} +BuildRequires: %{?scl_prefix}npm(mocha) +BuildRequires: %{?scl_prefix}npm(ansi-styles) +BuildRequires: %{?scl_prefix}npm(has-color) +BuildRequires: %{?scl_prefix}npm(strip-ansi) +%endif + +%description +%{summary}. + +%prep +%setup -q -n package +cp -p %{SOURCE1} . + +%nodejs_fixdep has-color '>=0.1' +%nodejs_fixdep supports-color '>=2.0' +%nodejs_fixdep escape-string-regexp '>=1.0' +%nodejs_fixdep ansi-styles '>=1.0' +%nodejs_fixdep strip-ansi '>=0.1' +%nodejs_fixdep has-ansi '>=2.0' + +%build +#nothing to do + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/chalk +cp -pr package.json index.js \ + %{buildroot}%{nodejs_sitelib}/chalk + +%nodejs_symlink_deps + + +%if 0%{?enable_tests} + +%check +%nodejs_symlink_deps --check +/usr/bin/mocha +%endif + +%files +%doc license readme.md +%{nodejs_sitelib}/chalk + +%changelog +* Wed Jan 06 2016 Tomas Hrcka - 1.1.1-3 +- Enable scl macros + +* Mon Sep 14 2015 Troy Dawson - 1.1.1-2 +- Fixup dependencies + +* Mon Sep 14 2015 Troy Dawson - 1.1.1-1 +- Update to 1.1.1 +- Remove tests until all dependencies are built + +* Sun Apr 20 2014 Jamie Nguyen - 0.4.0-2 +- fix versioned dependencies + +* Thu Mar 13 2014 Jamie Nguyen - 0.4.0-1 +- initial package \ No newline at end of file