From ee750a7eff11302b6f2fec0000718ab4cb36f50c Mon Sep 17 00:00:00 2001 From: papb <papb1996@gmail.com> Date: Thu, 22 Oct 2020 00:28:38 -0300 Subject: [PATCH] Meta tweaks --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 3 --- package.json | 15 ++++++++++++-- readme.md | 8 +++++++- 4 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2e3d8ba --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - + uses: actions/checkout@v2 + - + uses: actions/setup-node@v1 + with: + node-version: 14.x + - + run: npm install + - + run: npm run lint + test: + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + node-version: [14.x, 12.x, 10.x] + exclude: + - + node-version: 14.x + os: ubuntu-latest + - + node-version: 10.x + os: windows-latest + runs-on: ${{ matrix.os }} + steps: + - + uses: actions/checkout@v2 + - + name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - + run: npm install + - + run: npm run ava diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9d54f30..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - '12' \ No newline at end of file diff --git a/package.json b/package.json index 7c12810..b6f9565 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,16 @@ "engines": { "node": ">=10" }, + "keywords": [ + "tsv", + "json", + "string", + "table", + "matrix", + "convert", + "excel", + "typescript" + ], "scripts": { "build": "del-cli dist && tsc", "prepack": "npm run build", @@ -22,7 +32,8 @@ "main": "dist/source", "types": "dist/source", "files": [ - "dist/source" + "dist/source", + "!*.map" ], "devDependencies": { "@ava/typescript": "^1.1.1", @@ -31,7 +42,7 @@ "del-cli": "^3.0.1", "np": "^6.5.0", "source-map-support": "^0.5.19", - "typescript": "^4.0.3", + "typescript": "~4.0.3", "xo": "^0.34.1" }, "ava": { diff --git a/readme.md b/readme.md index f24f8c0..58337f8 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# tsv-json [![Build Status](https://travis-ci.com/papb/tsv-json.svg?branch=master)](https://travis-ci.com/papb/tsv-json) +# tsv-json ![Build Status](https://github.com/papb/tsv-json/workflows/CI/badge.svg) [![install size](https://packagephobia.com/badge?p=tsv-json)](https://packagephobia.com/result?p=tsv-json) > Convert between TSV and JSON (`string[][]`) @@ -8,6 +8,7 @@ * Zero dependencies * Simple and to the point * Written in TypeScript +* Handles double-quotes correctly ## Install @@ -37,6 +38,11 @@ Handles tabs, newlines and double-quotes correctly. Asserts the input is of the expected type (`string[][]` for `json2tsv`, `string` for `tsv2json`). +## Tip for Excel + +If you copy any TSV generated by this package and paste directly on an Excel cell, Excel will automatically parse the TSV and fit everything in the appropriate rows and columns, starting at the cell highlighted by you. + + ## Related * [tsv-json-cli](https://github.com/papb/tsv-json-cli) - CLI for this module