Skip to content

Commit

Permalink
build!: modernize deps and build (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Aug 9, 2020
1 parent e09ed8e commit 339d08d
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 43 deletions.
2 changes: 0 additions & 2 deletions .github/release-please.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/ci.yaml
@@ -0,0 +1,45 @@
on:
push:
branches:
- master
pull_request:
name: ci
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 14]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: node --version
- run: npm install
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm test
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm test
- run: npm run coverage
35 changes: 35 additions & 0 deletions .github/workflows/release-please.yml
@@ -0,0 +1,35 @@
on:
push:
branches:
- master
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: bcoe/release-please-action@v1.6.3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: cliui
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: npm install
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm run compile
- name: push Deno release
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN}}@github.com/yargs/cliui.git"
git checkout -b deno
git add -f build
git commit -a -m 'chore: ${{ steps.release.outputs.tag_name }} release'
git push origin +deno
git tag -a ${{ steps.release.outputs.tag_name }}-deno -m 'chore: ${{ steps.release.outputs.tag_name }} release'
git push origin ${{ steps.release.outputs.tag_name }}-deno
if: ${{ steps.release.outputs.release_created }}
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -2,3 +2,5 @@
node_modules
.nyc_output
package-lock.json
coverage

13 changes: 13 additions & 0 deletions .nycrc
@@ -0,0 +1,13 @@
{
"exclude": [
"build/test/**",
"test/**"
],
"reporter": [
"html",
"text"
],
"lines": 98.0,
"branches": "98",
"statements": "98.0"
}
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
@@ -1,9 +1,9 @@
# cliui

[![Build Status](https://travis-ci.org/yargs/cliui.svg)](https://travis-ci.org/yargs/cliui)
[![Coverage Status](https://coveralls.io/repos/yargs/cliui/badge.svg?branch=)](https://coveralls.io/r/yargs/cliui?branch=)
![ci](https://github.com/yargs/cliui/workflows/ci/badge.svg)
[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui)
[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
![nycrc config on GitHub](https://img.shields.io/nycrc/yargs/cliui)

easily create complex multi-column command-line-interfaces.

Expand Down
9 changes: 0 additions & 9 deletions nyc.config.js

This file was deleted.

32 changes: 10 additions & 22 deletions package.json
Expand Up @@ -4,26 +4,15 @@
"description": "easily create complex multi-column command-line-interfaces",
"main": "index.js",
"scripts": {
"pretest": "standard",
"test": "nyc mocha",
"coverage": "nyc --reporter=text-lcov mocha | coveralls"
"fix": "standard --fix",
"test": "c8 mocha",
"posttest": "standard",
"coverage": "c8 report --check-coverage"
},
"repository": {
"type": "git",
"url": "http://github.com/yargs/cliui.git"
},
"config": {
"blanket": {
"pattern": [
"index.js"
],
"data-cover-never": [
"node_modules",
"test"
],
"output-reporter": "spec"
}
},
"standard": {
"ignore": [
"**/example/**"
Expand All @@ -46,20 +35,19 @@
"dependencies": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^6.2.0"
"wrap-ansi": "^7.0.0"
},
"devDependencies": {
"c8": "^7.3.0",
"chai": "^4.2.0",
"chalk": "^3.0.0",
"coveralls": "^3.0.3",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"standard": "^12.0.1"
"chalk": "^4.1.0",
"mocha": "^8.1.1",
"standard": "^14.3.4"
},
"files": [
"index.js"
],
"engine": {
"node": ">=8"
"node": ">=10"
}
}
2 changes: 1 addition & 1 deletion test/cliui.js
Expand Up @@ -5,7 +5,7 @@
require('chai').should()

// Force chalk to enable color, if it's disabled the test fails.
process.env['FORCE_COLOR'] = 1
process.env.FORCE_COLOR = 1

const chalk = require('chalk')
const cliui = require('../')
Expand Down

0 comments on commit 339d08d

Please sign in to comment.