Skip to content

Commit

Permalink
Merge branch 'release/v1.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkGriffiths committed Aug 13, 2019
2 parents 4ca9c79 + 3d3a874 commit f9e615a
Show file tree
Hide file tree
Showing 7 changed files with 1,679 additions and 1,443 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ branches:
language: node_js
node_js:
- stable
- 11
- 10
- 9
- 8
env:
global:
- CC_TEST_REPORTER_ID=9930a88506218aaf57a8349f54d5003f0bc17ce71f50df77fe0fa86884aa267b
- CC_TEST_REPORTER_ID=ba42fc27c58fe141f19793fa5acb42d4d229da491a4c7a1568ba50a69a009e1f
before_install:
- '[[ $(node -v) =~ ^v10.*$ ]] || npm install -g npm@latest'
- '[[ $(node -v) =~ ^v12.*$ ]] || npm install -g npm@latest'
- npm install -g greenkeeper-lockfile
install: npm install
before_script:
Expand Down
73 changes: 36 additions & 37 deletions bin/truwrap
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ var getStdin = _interopDefault(require('get-stdin'));
var updateNotifier = _interopDefault(require('update-notifier'));
var commonTags = require('common-tags');
var string = require('@thebespokepixel/string');
var trucolor = require('trucolor');
var deepAssign = _interopDefault(require('deep-assign'));
var terminalFeatures = _interopDefault(require('term-ng'));
var columnify = _interopDefault(require('columnify'));
var osLocale = _interopDefault(require('os-locale'));
var verbosity = require('verbosity');
var meta = _interopDefault(require('@thebespokepixel/meta'));
var nSelector = require('@thebespokepixel/n-selector');
var ansiRegex = _interopDefault(require('ansi-regex'));
var trucolor = require('trucolor');
var deepAssign = _interopDefault(require('deep-assign'));
var fs = require('fs');
var path = require('path');
var _min = _interopDefault(require('lodash/min'));
var _max = _interopDefault(require('lodash/max'));
var _split = _interopDefault(require('lodash/split'));
var _forEach = _interopDefault(require('lodash/forEach'));
var terminalFeatures = _interopDefault(require('term-ng'));

const name = "truwrap";
const version = "1.0.3";
const version = "1.0.4";
const description = "Smarter terminal text wrapping (handles 24bit color)";
const author = "Mark Griffiths <[email protected]> (http://thebespokepixel.com/)";
const main = "index.js";
Expand All @@ -40,7 +40,7 @@ const files = [
"bin/"
];
const bugs = {
url: "https://github.com/MarkGriffiths/truwrap/issues"
url: "https://github.com/thebespokepixel/truwrap/issues"
};
const copyright = {
year: "2019",
Expand All @@ -56,47 +56,47 @@ const scripts = {
coverage: "nyc ava && nyc report --reporter=lcov --report-dir test/coverage; open test/coverage/lcov-report/index.html"
};
const devDependencies = {
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
ava: "^2.1.0",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
ava: "^2.2.0",
"babel-plugin-lodash": "^3.3.4",
"documentation-theme-bespoke": "^0.5.6",
gulp: "^4.0.2",
"gulp-better-rollup": "^4.0.1",
"gulp-chmod": "^3.0.0",
"gulp-rename": "^1.4.0",
nyc: "^14.1.1",
rollup: "^1.15.3",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^10.0.0",
rollup: "^1.19.4",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.2",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.0.2",
"rollup-plugin-node-resolve": "^5.2.0",
"semver-regex": "^3.1.0",
xo: "^0.24.0"
};
const dependencies = {
"@thebespokepixel/meta": "^1.0.3",
"@thebespokepixel/n-selector": "^1.0.3",
"@thebespokepixel/string": "^0.5.7",
"@thebespokepixel/meta": "^1.0.4",
"@thebespokepixel/n-selector": "^1.0.4",
"@thebespokepixel/string": "^0.5.8",
"ansi-regex": "^4.1.0",
columnify: "^1.5.4",
"common-tags": "^1.8.0",
"deep-assign": "^3.0.0",
"es6-promisify": "^6.0.1",
"get-stdin": "^7.0.0",
lodash: "^4.17.11",
lodash: "^4.17.15",
"os-locale": "^4.0.0",
"read-pkg-up": "^6.0.0",
"term-ng": "^1.0.3",
"term-ng": "^1.0.4",
trucolor: "^1.0.3",
"update-notifier": "^3.0.0",
verbosity: "^1.1.1",
yargs: "^13.2.4"
"update-notifier": "^3.0.1",
verbosity: "^1.1.2",
yargs: "^13.3.0"
};
const engines = {
node: ">=8.0"
};
const homepage = "https://github.com/MarkGriffiths/truwrap";
const homepage = "https://github.com/thebespokepixel/truwrap";
const keywords = [
"text",
"wrap",
Expand All @@ -111,7 +111,7 @@ const keywords = [
const license = "MIT";
const repository = {
type: "git",
url: "git+https://github.com/MarkGriffiths/truwrap.git"
url: "git+https://github.com/thebespokepixel/truwrap.git"
};
const xo = {
semicolon: false,
Expand All @@ -125,16 +125,16 @@ const xo = {
]
};
const badges = {
github: "MarkGriffiths",
github: "thebespokepixel",
npm: "thebespokepixel",
name: "truwrap",
codeclimate: "e03a2055456023267873",
codeclimate: "5732d1aad01d74b6ef4a",
providers: {
aux1: {
title: "github",
text: "source",
color: "4E73B6",
link: "https://github.com/MarkGriffiths/truwrap"
link: "https://github.com/thebespokepixel/truwrap"
}
},
readme: {
Expand All @@ -156,8 +156,7 @@ const badges = {
"rollup"
],
Help: [
"inch",
"gitter"
"inch"
]
},
docs: [
Expand Down Expand Up @@ -197,6 +196,16 @@ var pkg = {
badges: badges
};

const clr = deepAssign(trucolor.simple({
format: 'sgr'
}), trucolor.palette({
format: 'sgr'
}, {
bright: 'bold rgb(255,255,255)',
dark: '#333'
}));
const colorReplacer = new commonTags.TemplateTag(commonTags.replaceSubstitutionTransformer(/([a-zA-Z]+?)[:/|](.+)/, (match, colorName, content) => `${clr[colorName]}${content}${clr[colorName].out}`));

const tabRegex = /\t/g;
const newlineRegex = /\n/g;

Expand Down Expand Up @@ -349,16 +358,6 @@ class WrapTool {

var createWrapTool = (options => new WrapTool(options));

const clr = deepAssign(trucolor.simple({
format: 'sgr'
}), trucolor.palette({
format: 'sgr'
}, {
bright: 'bold rgb(255,255,255)',
dark: '#333'
}));
const colorReplacer = new commonTags.TemplateTag(commonTags.replaceSubstitutionTransformer(/([a-zA-Z]+?)[:/|](.+)/, (match, colorName, content) => `${clr[colorName]}${content}${clr[colorName].out}`));

const prefix = '\u001B]1337;File=inline=1;';
const suffix = '\u0007';
const broken = `${__dirname}/../media/broken.png`;
Expand Down
26 changes: 13 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<title>truwrap 1.0.3 | Documentation</title>
<title>truwrap 1.0.4 | Documentation</title>
<meta name='description' content='Smarter terminal text wrapping (handles 24bit color)'>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="assets/css/ace.min.css" rel="stylesheet">
Expand All @@ -15,7 +15,7 @@
<div id='split-left' class='overflow-auto fs0 height-viewport-100 sidebar'>
<div class='py1 px2'>
<h3 class="m0 no-anchor">truwrap</h3>
<div class="mb1"><code>1.0.3</code></div>
<div class="mb1"><code>1.0.4</code></div>
<input
placeholder="Filter"
id="filter-input"
Expand Down Expand Up @@ -113,9 +113,9 @@ <h3 class="m0 no-anchor">truwrap</h3>

</ul>
</div>
<div class="badges"><p><p><a href="https://github.com/MarkGriffiths/truwrap" title="Github"><img src="https://img.shields.io/badge/github-source-4E73B6.svg?style=flat" alt="Github"></a> <a href="https://travis-ci.org/MarkGriffiths/truwrap" title="Travis"><img src="https://img.shields.io/travis/MarkGriffiths/truwrap.svg?branch=master&#x26;style=flat&#x26;logo=travis" alt="Travis"></a> <br>
</p> <p><a href="https://codeclimate.com/github/MarkGriffiths/truwrap/maintainability" title="Code-climate"><img src="https://api.codeclimate.com/v1/badges/e03a2055456023267873/maintainability?style=flat" alt="Code-climate"></a> <a href="https://codeclimate.com/github/MarkGriffiths/truwrap/test_coverage" title="Coverage"><img src="https://api.codeclimate.com/v1/badges/e03a2055456023267873/test_coverage?style=flat" alt="Coverage"></a> <br>
</p> <p><a href="https://david-dm.org/MarkGriffiths/truwrap/master" title="David"><img src="https://img.shields.io/david/MarkGriffiths/truwrap.svg?branch=master&#x26;style=flat" alt="David"></a> <br>
<div class="badges"><p><p><a href="https://github.com/thebespokepixel/truwrap" title="Github"><img src="https://img.shields.io/badge/github-source-4E73B6.svg?style=flat" alt="Github"></a> <a href="https://travis-ci.org/thebespokepixel/truwrap" title="Travis"><img src="https://img.shields.io/travis/thebespokepixel/truwrap.svg?branch=master&#x26;style=flat&#x26;logo=travis" alt="Travis"></a> <br>
</p> <p><a href="https://codeclimate.com/github/thebespokepixel/truwrap/maintainability" title="Code-climate"><img src="https://api.codeclimate.com/v1/badges/5732d1aad01d74b6ef4a/maintainability?style=flat" alt="Code-climate"></a> <a href="https://codeclimate.com/github/thebespokepixel/truwrap/test_coverage" title="Coverage"><img src="https://api.codeclimate.com/v1/badges/5732d1aad01d74b6ef4a/test_coverage?style=flat" alt="Coverage"></a> <br>
</p> <p><a href="https://david-dm.org/thebespokepixel/truwrap/master" title="David"><img src="https://img.shields.io/david/thebespokepixel/truwrap.svg?branch=master&#x26;style=flat" alt="David"></a> <br>
</p> <br>
</p></div>
<div class="mt1 h6 quiet">
Expand Down Expand Up @@ -220,7 +220,7 @@ <h3 class='left m0 panel-title' id='truwrap'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://github.com/MarkGriffiths/truwrap/blob/4e0b673d50609abb2b2fc4438594de41132e2377/src/index.js#L50-L218'>
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/af5206f3804b49934b293011aa241649df946a98/src/index.js#L50-L218'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -383,7 +383,7 @@ <h3 class='left m0 panel-title' id='api'>
</h3>


<a class='pl3 pr1 right rounded github' href='https://github.com/MarkGriffiths/truwrap/blob/4e0b673d50609abb2b2fc4438594de41132e2377/src/index.js#L100-L167'>
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/af5206f3804b49934b293011aa241649df946a98/src/index.js#L100-L167'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -432,7 +432,7 @@ <h3 class='left m0 panel-title' id='api'>
<div class='clearfix'>


<a class='pl3 pr1 right rounded github' href='https://github.com/MarkGriffiths/truwrap/blob/4e0b673d50609abb2b2fc4438594de41132e2377/src/index.js#L107-L113'>
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/af5206f3804b49934b293011aa241649df946a98/src/index.js#L107-L113'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -495,7 +495,7 @@ <h3 class='left m0 panel-title' id='api'>
<div class='clearfix'>


<a class='pl3 pr1 right rounded github' href='https://github.com/MarkGriffiths/truwrap/blob/4e0b673d50609abb2b2fc4438594de41132e2377/src/index.js#L119-L119'>
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/af5206f3804b49934b293011aa241649df946a98/src/index.js#L119-L119'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -558,7 +558,7 @@ <h3 class='left m0 panel-title' id='api'>
<div class='clearfix'>


<a class='pl3 pr1 right rounded github' href='https://github.com/MarkGriffiths/truwrap/blob/4e0b673d50609abb2b2fc4438594de41132e2377/src/index.js#L128-L134'>
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/af5206f3804b49934b293011aa241649df946a98/src/index.js#L128-L134'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -644,7 +644,7 @@ <h3 class='left m0 panel-title' id='api'>
<div class='clearfix'>


<a class='pl3 pr1 right rounded github' href='https://github.com/MarkGriffiths/truwrap/blob/4e0b673d50609abb2b2fc4438594de41132e2377/src/index.js#L142-L145'>
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/af5206f3804b49934b293011aa241649df946a98/src/index.js#L142-L145'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -722,7 +722,7 @@ <h3 class='left m0 panel-title' id='api'>
<div class='clearfix'>


<a class='pl3 pr1 right rounded github' href='https://github.com/MarkGriffiths/truwrap/blob/4e0b673d50609abb2b2fc4438594de41132e2377/src/index.js#L152-L155'>
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/af5206f3804b49934b293011aa241649df946a98/src/index.js#L152-L155'>
<span>src/index.js</span>
</a>

Expand Down Expand Up @@ -785,7 +785,7 @@ <h3 class='left m0 panel-title' id='api'>
<div class='clearfix'>


<a class='pl3 pr1 right rounded github' href='https://github.com/MarkGriffiths/truwrap/blob/4e0b673d50609abb2b2fc4438594de41132e2377/src/index.js#L163-L166'>
<a class='pl3 pr1 right rounded github' href='https://github.com/thebespokepixel/truwrap/blob/af5206f3804b49934b293011aa241649df946a98/src/index.js#L163-L166'>
<span>src/index.js</span>
</a>

Expand Down
Loading

0 comments on commit f9e615a

Please sign in to comment.