Comparing version 2.7.6 to 2.8.0
@@ -42,3 +42,3 @@ /** | ||
command: function () { | ||
var cmd = 'browserify --standalone=TtyTable '+_ignore+' -r ./adapters/default-adapter.js > ./dist/<%= pkg.name %>.js -t [ babelify --presets [ es2015 babili] ] -p [ browserify-banner --template "'+banner+'"]'; | ||
var cmd = 'npx browserify --standalone=TtyTable '+_ignore+' -r ./adapters/default-adapter.js > ./dist/<%= pkg.name %>.js -t [ babelify --presets [ es2015 babili] ] -p [ browserify-banner --template "'+banner+'"]'; | ||
return cmd; | ||
@@ -49,3 +49,3 @@ } | ||
command: function () { | ||
var cmd = 'browserify --debug --standalone=TtyTable '+_ignore+' -r ./adapters/default-adapter.js > ./dist/<%= pkg.name %>.devel.js -t [ babelify --presets [ es2015 babili] ]'; | ||
var cmd = 'npx browserify --debug --standalone=TtyTable '+_ignore+' -r ./adapters/default-adapter.js > ./dist/<%= pkg.name %>.devel.js -t [ babelify --presets [ es2015 babili] ]'; | ||
return cmd; | ||
@@ -56,3 +56,3 @@ } | ||
command: function () { | ||
var cmd = 'browserify '+_ignore+' -r ./adapters/default-adapter.js:<%= pkg.name %> > ./dist/<%= pkg.name %>.bundle.js -t [ babelify --presets [ es2015 babili] ]'; | ||
var cmd = 'npx browserify '+_ignore+' -r ./adapters/default-adapter.js:<%= pkg.name %> > ./dist/<%= pkg.name %>.bundle.js -t [ babelify --presets [ es2015 babili] ]'; | ||
return cmd; | ||
@@ -63,3 +63,3 @@ } | ||
command: function () { | ||
var cmd = 'browserify --debug '+_ignore+' -r ./adapters/default-adapter.js:<%= pkg.name %> > ./dist/<%= pkg.name %>.bundle.devel.js -t [ babelify --presets [ es2015 babili] ]'; | ||
var cmd = 'npx browserify --debug '+_ignore+' -r ./adapters/default-adapter.js:<%= pkg.name %> > ./dist/<%= pkg.name %>.bundle.devel.js -t [ babelify --presets [ es2015 babili] ]'; | ||
return cmd; | ||
@@ -66,0 +66,0 @@ } |
{ | ||
"name": "tty-table", | ||
"version": "2.7.6", | ||
"version": "2.8.0", | ||
"description": "Command line table generator.", | ||
@@ -14,3 +14,3 @@ "main": "src/main.js", | ||
"scripts": { | ||
"test": "grunt t" | ||
"test": "npx grunt t" | ||
}, | ||
@@ -39,3 +39,3 @@ "repository": { | ||
"chalk": "^2.4.2", | ||
"csv": "^5.1.1", | ||
"csv": "^5.1.3", | ||
"smartwrap": "^1.1.0", | ||
@@ -50,3 +50,4 @@ "strip-ansi": "^5.2.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babelify": "^10.0.0", | ||
"babelify": "^8.0.0", | ||
"browserify": "^16.5.0", | ||
"browserify-banner": "^1.0.14", | ||
@@ -56,2 +57,3 @@ "chai": "^4.2.0", | ||
"grunt": "^1.0.4", | ||
"grunt-cli": "^1.3.2", | ||
"grunt-contrib-uglify": "^4.0.1", | ||
@@ -58,0 +60,0 @@ "grunt-contrib-watch": "^1.1.0", |
@@ -161,3 +161,3 @@ # tty-table 电传打字台 | ||
```sh | ||
$ grunt test | ||
$ npx grunt test | ||
``` | ||
@@ -168,3 +168,3 @@ | ||
```sh | ||
$ grunt st | ||
$ npx grunt st | ||
``` | ||
@@ -180,3 +180,3 @@ - Because: | ||
```sh | ||
$ grunt tags | ||
$ npx grunt tags | ||
``` | ||
@@ -187,3 +187,3 @@ | ||
```sh | ||
$ grunt watch | ||
$ npx grunt watch | ||
``` | ||
@@ -190,0 +190,0 @@ |
let defaults = { | ||
borderCharacters : { | ||
"none": [ | ||
"invisible": [ | ||
{v: " ", l: " ", j: " ", h: " ", r: " "}, | ||
@@ -17,2 +17,7 @@ {v: " ", l: " ", j: " ", h: " ", r: " "}, | ||
{v: "|", l: "+", j: "+", h: "-", r: "+"} | ||
], | ||
"none": [ | ||
{v: "", l: "", j: "", h: "", r: ""}, | ||
{v: "", l: "", j: "", h: "", r: ""}, | ||
{v: "", l: "", j: "", h: "", r: ""} | ||
] | ||
@@ -19,0 +24,0 @@ }, |
@@ -13,9 +13,9 @@ const Defaults = require('./defaults.js'); | ||
* @param {string} header.column.color - default: terminal default color | ||
* @param {string} header.column.footerAlign - default: "center" | ||
* @param {string} header.column.footerAlign - default: "center" | ||
* @param {string} header.column.footerColor - default: terminal default color | ||
* @param {function} header.column.formatter - Runs a callback on each cell value in the parent column | ||
* @param {string} header.column.headerAlign - default: "center" | ||
* @param {string} header.column.headerAlign - default: "center" | ||
* @param {string} header.column.headerColor - default: terminal's default color | ||
* @param {number} header.column.marginLeft - default: 0 | ||
* @param {number} header.column.marginTop - default: 0 | ||
* @param {number} header.column.marginTop - default: 0 | ||
* @param {string|number} header.column.width - default: "auto" | ||
@@ -25,9 +25,9 @@ * @param {number} header.column.paddingBottom - default: 0 | ||
* @param {number} header.column.paddingRight - default: 1 | ||
* @param {number} header.column.paddingTop - default: 0 | ||
* @param {number} header.column.paddingTop - default: 0 | ||
* | ||
* @param {array} rows - [See example](#example-usage) | ||
* | ||
* @param {object} options - Table options | ||
* @param {object} options - Table options | ||
* @param {string} options.borderStyle - default: "solid". options: "solid", "dashed", "none" | ||
* @param {object} options.borderCharacters - [See @note](#note) | ||
* @param {object} options.borderCharacters - [See @note](#note) | ||
* @param {string} options.borderColor - default: terminal's default color | ||
@@ -39,7 +39,7 @@ * @param {boolean} options.compact - default: false | ||
* @param {boolean} options.errorOnNull - default: false | ||
* @param {mixed} options.truncate - default: false | ||
* @param {mixed} options.truncate - default: false | ||
* <br/> | ||
* When this property is set to a string, cell contents will be truncated by that string instead of wrapped when they extend beyond of the width of the cell. | ||
* <br/> | ||
* For example if: | ||
* For example if: | ||
* <br/> | ||
@@ -51,24 +51,3 @@ * <code>"truncate":"..."</code> | ||
* @returns {Table} | ||
* @note | ||
* <a name="note"/> | ||
* Available border character sets: | ||
* ```js | ||
*{ | ||
* "none": [ | ||
* {v: " ", l: " ", j: " ", h: " ", r: " "}, | ||
* {v: " ", l: " ", j: " ", h: " ", r: " "}, | ||
* {v: " ", l: " ", j: " ", h: " ", r: " "} | ||
* ], | ||
* "solid": [ | ||
* {v: "│", l: "┌", j: "┬", h: "─", r: "┐"}, | ||
* {v: "│", l: "├", j: "┼", h: "─", r: "┤"}, | ||
* {v: "│", l: "└", j: "┴", h: "─", r: "┘"} | ||
* ], | ||
* "dashed": [ | ||
* {v: "|", l: "+", j: "+", h: "-", r: "+"}, | ||
* {v: "|", l: "+", j: "+", h: "-", r: "+"}, | ||
* {v: "|", l: "+", j: "+", h: "-", r: "+"} | ||
* ] | ||
*} | ||
* ``` | ||
* @example | ||
@@ -82,3 +61,3 @@ * ```js | ||
*/ | ||
let Factory = function(paramsArr){ | ||
const Factory = function(paramsArr){ | ||
@@ -85,0 +64,0 @@ let _configKey = Symbol['config']; |
@@ -1,6 +0,6 @@ | ||
let StripAnsi = require("strip-ansi"); | ||
//let Wrap = require("word-wrap"); | ||
let Wrap = require("smartwrap"); | ||
let Wcwidth = require("wcwidth"); | ||
let Format = {}; | ||
const StripAnsi = require("strip-ansi"); | ||
//const Wrap = require("word-wrap"); | ||
const Wrap = require("smartwrap"); | ||
const Wcwidth = require("wcwidth"); | ||
const Format = {}; | ||
@@ -7,0 +7,0 @@ Format.calculateLength = function(line) { |
@@ -1,3 +0,3 @@ | ||
let Style = require("./style.js"); | ||
let Format = require("./format.js"); | ||
const Style = require("./style.js"); | ||
const Format = require("./format.js"); | ||
let Render = {}; | ||
@@ -118,2 +118,5 @@ | ||
break; | ||
//skip if border style is "none" | ||
case(config.borderStyle === "none" && config.compact): | ||
break; | ||
default: | ||
@@ -120,0 +123,0 @@ output += borders[1]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
59
22
1098434
19
18637
Updatedcsv@^5.1.3