Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Danger Init #430

Merged
merged 10 commits into from
Dec 6, 2017
Merged

Danger Init #430

merged 10 commits into from
Dec 6, 2017

Conversation

orta
Copy link
Member

@orta orta commented Nov 30, 2017

A bunch of words need to change (Ruby -> JS, remove anthropomorphizing) but the majority of the grunt work is done

@DangerCI
Copy link

DangerCI commented Dec 2, 2017

New dependencies added: hyperlinker, readline-sync, supports-hyperlinks and @types/readline-sync.

hyperlinker

Author: James Talmage

Description: Write hyperlinks in the terminal.

Homepage: https://github.com/jamestalmage/hyperlinker#readme

Created8 days ago
Last Updated8 days ago
LicenseMIT
Maintainers1
Releases1
Direct Dependencies
Keywordsterminal, link, hyperlink and cli
README

hyperlinker Build Status codecov

Write hyperlinks in the terminal.

Terminal emulators are starting to support hyperlinks. While many terminals have long detected URL's and linkified them, allowing you to Command-Click or Control-Click them to open a browser, you were forced to print the long unsightly URL's on the screen. As of spring 2017 a few terminals began supporting HTML like links, where the link text and destination could be specified separately.

This module will create hyperlinks when printed to a supported terminal.

Install

$ npm install hyperlinker

Usage

const hyperlinker = require('hyperlinker');

console.log(hyperlinker('some text', 'https://example.com') + '   <--- command + click here!');
// some text    <-- command + click here!

Note that this module does not check to see if hyperlinks are supported in the current Terminal. In unsupported terminals, users will likely only see the text command. You should use module supports-hyperlinks if you want to provide an alternate presentation based on Terminal support.

const supportsHyperlinks = require('supports-hyperlinks');
const hyperlinker = require('hyperlinker');

if (supportsHyperlinks.stdout) {
    console.log(hyperlinker('click here', 'https://example.com'));
} else {
    console.log('Copy and paste the following in your browser: \n\t https://example.com');
}

API

hyperlinker(text, uri, [params])

text

Type: string

The text that will be visible in the link. This is equivalent to the text between the opening <a> and closing </a> tags in HTML.

uri

Type: string

A URI (i.e https://example.com) where the link will point to. This is equivalent to the context of the href attribute in an HTML <a> tag.

params

Type: Object

Optional

A collection of key value pairs, that will be printed as hidden params. There's not a lot of use for these right now, except for maybe an id param. It is intended to allow extension of the spec in the future.

License

MIT © James Talmage

yarn why hyperlinker output

  • Has been hoisted to "hyperlinker"
  • This module exists because it's specified in "dependencies".
  • Disk size without dependencies: "20kB"
  • Disk size with unique dependencies: "20kB"
  • Disk size with transitive dependencies: "20kB"
  • Number of shared dependencies: 0

readline-sync

Author: anseki

Description: Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).

Homepage: https://github.com/anseki/readline-sync

Createdover 4 years ago
Last Updated16 days ago
LicenseMIT
Maintainers1
Releases62
Keywordsreadline, synchronous, interactive, prompt, question, password, cli, tty, command, repl, keyboard, wait and block
This README is too long to show.
yarn why readline-sync output

  • Has been hoisted to "readline-sync"
  • This module exists because it's specified in "dependencies".
  • Disk size without dependencies: "204kB"
  • Disk size with unique dependencies: "204kB"
  • Disk size with transitive dependencies: "204kB"
  • Number of shared dependencies: 0

supports-hyperlinks

Author: James Talmage

Description: Detect if your terminal emulator supports hyperlinks

Homepage: https://github.com/jamestalmage/supports-hyperlinks#readme

Created8 days ago
Last Updated8 days ago
LicenseMIT
Maintainers1
Releases2
Direct Dependencieshas-flag and supports-color
Keywordslink, terminal, hyperlink and cli
README

supports-hyperlinks Build Status codecov

Detect whether a terminal emulator supports hyperlinks

Terminal emulators are starting to support hyperlinks. While many terminals have long detected URL's and linkified them, allowing you to Command-Click or Control-Click them to open a browser, you were forced to print the long unsightly URL's on the screen. As of spring 2017 a few terminals began supporting HTML like links, where the link text and destination could be specified separately.

This module allows you to detect if hyperlinks are supported in the current Terminal.

As this is a new development, we anticipate the list of supported Terminals to grow rapidly. Please open an issue or submit a PR as new Terminals implement support.

Install

$ npm install supports-hyperlinks

Usage

const supportsHyperlinks = require('supports-hyperlinks');

if (supportsHyperlinks.stdout) {
	console.log('Terminal stdout supports hyperlinks');
}

if (supportsHyperlinks.stderr) {
	console.log('Terminal stderr supports hyperlinks');
}

API

Returns an Object with a stdout and stderr property for testing either streams. Each property is a boolean, indicating whether or not hyperlinks are supported.

Info

Obeys the --no-hyperlinks, --hyperlink=always, and --hyperlink=never CLI flags.

Can be overridden by the user with the flags --hyperlinks=always and --no-hyperlinks. For situations where using those flags are not possible, add the environment variable FORCE_HYPERLINK=1 to forcefully enable hyperlinks or FORCE_HYPERLINK=0 to forcefully disable. The use of FORCE_HYPERLINK overrides all other hyperlink support checks.

License

MIT © James Talmage

yarn why supports-hyperlinks output

  • Has been hoisted to "supports-hyperlinks"
  • This module exists because it's specified in "dependencies".
  • Disk size without dependencies: "48kB"
  • Disk size with unique dependencies: "84kB"
  • Disk size with transitive dependencies: "84kB"
  • Number of shared dependencies: 2

Generated by 🚫 dangerJS

@orta orta changed the title WIP port danger init Danger Init Dec 5, 2017
@orta
Copy link
Member Author

orta commented Dec 5, 2017

These are actually green-ing on windows
screen shot 2017-12-05 at 6 10 25 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants