Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkGriffiths committed Feb 19, 2020
1 parent 8899e0a commit a8824fc
Show file tree
Hide file tree
Showing 9 changed files with 5,120 additions and 3,882 deletions.
44 changes: 23 additions & 21 deletions .travis.yml
@@ -1,33 +1,35 @@
---
branches:
only:
- master
- develop
- "/^greenkeeper/.*$/"
- "/^feature/.*$/"
- master
- develop
- /^greenkeeper/.*$/
- /^feature/.*$/
language: node_js
node_js:
- stable
- 11
- 10
- 9
- 8
- stable
- 12
- 11
- 10
env:
global:
- CC_TEST_REPORTER_ID=71353381ba1b658ffa6a6525569e63a14976d3de21d7dfa9bf4c109d19983243
- CC_TEST_REPORTER_ID=71353381ba1b658ffa6a6525569e63a14976d3de21d7dfa9bf4c109d19983243
before_install:
- "[[ $(node -v) =~ ^v12.*$ ]] || npm install -g npm@latest"
- npm install -g greenkeeper-lockfile
install: npm install
- npm i -g npm
- npm install -g greenkeeper-lockfile
install: npm ci --no-optional
before_script:
- greenkeeper-lockfile-update
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
> ./cc-test-reporter
- chmod +x ./cc-test-reporter
- "./cc-test-reporter before-build"
- greenkeeper-lockfile-update
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- "./cc-test-reporter before-build"
after_script:
- greenkeeper-lockfile-upload
- "[ $TRAVIS_NODE_VERSION = stable ] && nyc report --reporter=lcov && ./cc-test-reporter
after-build --debug -t lcov --exit-code $TRAVIS_TEST_RESULT || echo 'Coverage skipped'"
- greenkeeper-lockfile-upload
- "[ $TRAVIS_NODE_VERSION = stable ] && nyc report --reporter=lcov && ./cc-test-reporter
after-build --debug -t lcov --exit-code $TRAVIS_TEST_RESULT || echo 'Coverage skipped'"
notifications:
slack:
secure: k8prVQTufAadnHw3WL31uoidomdKCxLd3Xoe2pJveKSkCWHJfvrEknkSY3tB99OxLqKG7VfD8946m6FuTg171s6K7Yzv6sDCJZCkxWaBWZ6xlPjyapkz+xzVQJpFhmuE6dxIOH8BvOkM+EqHxjhcJE5iUjwXyV9YxEPAO3AqQFtjz08Bh+6d4HI77iNpb8MkPiqzplcrG4TXHceBxV5mvjmatPAaZAsq9Yi/toj2oOmHYYjDWXtHEdfkOQNuuWZzlcuDtkpxhJGEp9Xh06AQWJOlvivLCwvDqyZbVZ7bZsep6TD8Tu7HgP3UiIEUxfM4/tcjo80wolSmMa8f0rCdSxbYBBEoy4UmLn68QCgFA5twUEOsY914wx4NvKvy+ZQapskqsGt/UawL8TQmRVdPKoCAqtUbrdR53DsX731RApvMxvpi0inESzS96uJgY6ZsJL+zOUDizGVPJ1M/QdHtQU4Bw5ZOEZJEy6YupcmNIdyFxkTi2942H7z/YUpuEY3fYN2kenYTNFe/fhTpFWlI1kvJwZOHh4/Q7QhhmdqxXRzhDBsgl5UYA1JcPekOUhw844eRS8sG3cVCsts275cdYV7czNQw40PU1dN//QpcJ67KM0VRMX1ewxlglFFTeOrsG7ssOFmAEC7ebeaognt9bdfyXI32BZ16DNm4Vd97vkU=
cache:
directories:
- "$HOME/.npm"
46 changes: 27 additions & 19 deletions bin/termng
Expand Up @@ -35,7 +35,7 @@ const repository = {
url: "https://github.com/thebespokepixel/term-ng.git"
};
const engines = {
node: ">=8.0"
node: ">=10.0"
};
const keywords = [
"24bit",
Expand All @@ -51,7 +51,7 @@ const keywords = [
];
const author = "Mark Griffiths <mark@thebespokepixel.com> (http://thebespokepixel.com/)";
const copyright = {
year: "2019",
year: "2020",
owner: "The Bespoke Pixel"
};
const license = "MIT";
Expand All @@ -60,31 +60,32 @@ const bugs = {
};
const homepage = "https://github.com/thebespokepixel/term-ng#readme";
const devDependencies = {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
ava: "^2.2.0",
"@ava/babel": "^1.0.1",
"@babel/core": "^7.8.4",
"@babel/preset-env": "^7.8.4",
ava: "^3.3.0",
"babel-plugin-lodash": "^3.3.4",
"documentation-theme-bespoke": "^1.0.0",
"documentation-theme-bespoke": "^1.1.2",
gulp: "^4.0.2",
"gulp-better-rollup": "^4.0.1",
"gulp-chmod": "^3.0.0",
"gulp-rename": "^1.3.0",
"gulp-rename": "^2.0.0",
"gulp-strip-comments": "^2.5.2",
nyc: "^14.1.1",
rollup: "^1.19.4",
nyc: "^15.0.0",
rollup: "^1.31.1",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.2",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
xo: "^0.24.0"
xo: "^0.26.1"
};
const dependencies = {
"@thebespokepixel/meta": "^1.0.4",
"@thebespokepixel/meta": "^2.0.1",
"read-pkg": "^5.2.0",
trucolor: "^1.0.6",
truwrap: "^1.0.5",
"update-notifier": "^3.0.1",
yargs: "^13.3.0"
"update-notifier": "^4.1.0",
yargs: "^15.1.0"
};
const xo = {
semicolon: false,
Expand All @@ -97,6 +98,12 @@ const xo = {
"src/docs/example.js"
]
};
const ava = {
babel: true,
files: [
"test/*.js"
]
};
const badges = {
github: "thebespokepixel",
npm: "thebespokepixel",
Expand Down Expand Up @@ -176,12 +183,13 @@ var pkg = {
devDependencies: devDependencies,
dependencies: dependencies,
xo: xo,
ava: ava,
badges: badges
};

const itermSession = process.env.ITERM_SESSION_ID && process.env.ITERM_SESSION_ID.indexOf(':') > 0;
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.indexOf('truecolor') >= 0;
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.indexOf('16m') >= 0;
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.includes('truecolor');
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.includes('16m');
const has16m = itermSession || colorTermTruecolor || termColor16m;

if (has16m && !/-color/.test(process.argv.join(''))) {
Expand Down Expand Up @@ -320,7 +328,7 @@ If user-agent is used, the command will return the string on stdout and exit sta
${clr.title}Usage:${clr.title.out}
${clr.command}termng ${clr.option}[command]${clr.option.out}`;
const epilogue = `${clr.title}© 2016 The Bespoke Pixel. ${clr.grey}Released under the MIT License.${clr.grey.out}`;
const epilogue = `${clr.title}${metadata.copyright}. ${clr.grey}Released under the MIT License.${clr.grey.out}`;

if (!(process.env.USER === 'root' && process.env.SUDO_USER !== process.env.USER)) {
updateNotifier({
Expand All @@ -332,7 +340,7 @@ if (argv.help) {
renderer.write(usage);
renderer.break(2);
renderer.write(_yargs.getUsageInstance().help());
renderer.break();
renderer.break(2);
renderer.write(epilogue);
renderer.break(2);
process.exit(0);
Expand All @@ -343,7 +351,7 @@ if (argv.version) {
process.exit(0);
}

if (argv._.indexOf('user-agent') !== -1) {
if (argv._.includes('user-agent')) {
process.stdout.write(termNG.software);
process.exit(0);
}
Expand Down
4 changes: 2 additions & 2 deletions index.js
@@ -1,8 +1,8 @@
'use strict';

const itermSession = process.env.ITERM_SESSION_ID && process.env.ITERM_SESSION_ID.indexOf(':') > 0;
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.indexOf('truecolor') >= 0;
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.indexOf('16m') >= 0;
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.includes('truecolor');
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.includes('16m');
const has16m = itermSession || colorTermTruecolor || termColor16m;

if (has16m && !/-color/.test(process.argv.join(''))) {
Expand Down
4 changes: 2 additions & 2 deletions index.mjs
@@ -1,6 +1,6 @@
const itermSession = process.env.ITERM_SESSION_ID && process.env.ITERM_SESSION_ID.indexOf(':') > 0;
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.indexOf('truecolor') >= 0;
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.indexOf('16m') >= 0;
const colorTermTruecolor = process.env.COLORTERM && process.env.COLORTERM.includes('truecolor');
const termColor16m = process.env.TERM_COLOR && process.env.TERM_COLOR.includes('16m');
const has16m = itermSession || colorTermTruecolor || termColor16m;

if (has16m && !/-color/.test(process.argv.join(''))) {
Expand Down

0 comments on commit a8824fc

Please sign in to comment.