Skip to content

Commit

Permalink
chore: fixed browser opening and travis links
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed Oct 5, 2018
1 parent a24f302 commit a9a11cc
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</h1>
<div align="center">
<a href="http://slack.crocodilejs.com"><img src="http://slack.crocodilejs.com/badge.svg" alt="chat" /></a>
<a href="https://travis-ci.org/lassjs/lass"><img src="https://travis-ci.org/lassjs/lass.svg?branch=master" alt="build status" /></a>
<a href="https://travis-ci.com/lassjs/lass"><img src="https://travis-ci.com/lassjs/lass.svg?branch=master" alt="build status" /></a>
<a href="https://codecov.io/github/lassjs/lass"><img src="https://img.shields.io/codecov/c/github/lassjs/lass/master.svg" alt="code coverage" /></a>
<a href="https://github.com/sindresorhus/xo"><img src="https://img.shields.io/badge/code_style-XO-5ed9c7.svg" alt="code style" /></a>
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg" alt="styled with prettier" /></a>
Expand Down Expand Up @@ -179,7 +179,7 @@ If you are seeking permission to use these trademarks, then please [contact us](

[codecov]: https://codecov.io

[travis-ci]: https://travis-ci.org
[travis-ci]: https://travis-ci.com

[ava]: https://github.com/avajs/ava

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"is-url": "^1.2.4",
"is-valid-npm-name": "^0.0.4",
"npm-conf": "^1.1.3",
"opn": "^5.4.0",
"sao": "^0.22.17",
"semver": "^5.5.1",
"shelljs": "^0.8.2",
Expand Down
24 changes: 7 additions & 17 deletions sao.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const fixpack = require('fixpack');
const execa = require('execa');
const { which } = require('shelljs');
const githubUsernameRegex = require('github-username-regex');
const opn = require('opn');
const isURL = require('is-url');
const isEmail = require('is-email');
const semver = require('semver');
Expand Down Expand Up @@ -170,22 +169,13 @@ module.exports = {
}
}

// Open browser
try {
const gh = ctx.answers.repo.replace('https://github.com/', '');
await Promise.all(
[
ctx.answers.repo,
`https://travis-ci.${ctx.answers.public ? 'org' : 'com'}/${gh}`,
`https://codecov.io/gh/${gh}`
].map(link => opn(link, { wait: false }))
);
ctx.log.success(
'Opened browser to GitHub, Travis-CI, and Codecov for configuration!'
);
} catch (err) {
ctx.log.error(err.message);
}
// Comment links for user
const gh = ctx.answers.repo.replace('https://github.com/', '');
[
ctx.answers.repo,
`https://travis-ci.com}/${gh}`,
`https://codecov.io/gh/${gh}`
].map(link => ctx.log(`TODO: ${link}`));

// Fix package.json file
fixpack(`${ctx.folderPath}/package.json`);
Expand Down
2 changes: 1 addition & 1 deletion template/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# <%- name %>

[![build status](https://img.shields.io/travis/<%- repo.replace('https://github.com/', '') %>.svg)](https://travis-ci.org/<%- repo.replace('https://github.com/', '') %>)
[![build status](https://img.shields.io/travis/<%- repo.replace('https://github.com/', '') %>.svg)](https://travis-ci.com/<%- repo.replace('https://github.com/', '') %>)
[![code coverage](https://img.shields.io/codecov/c/github/<%- repo.replace('https://github.com/', '') %>.svg)](https://codecov.io/gh/<%- repo.replace('https://github.com/', '') %>)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
Expand Down
2 changes: 1 addition & 1 deletion test/snapshots/test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Generated by [AVA](https://ava.li).
`# my-package-name␊
[![build status](https://img.shields.io/travis/niftylettuce/my-package-name.svg)](https://travis-ci.org/niftylettuce/my-package-name)␊
[![build status](https://img.shields.io/travis/niftylettuce/my-package-name.svg)](https://travis-ci.com/niftylettuce/my-package-name)␊
[![code coverage](https://img.shields.io/codecov/c/github/niftylettuce/my-package-name.svg)](https://codecov.io/gh/niftylettuce/my-package-name)␊
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)␊
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)␊
Expand Down
Binary file modified test/snapshots/test.js.snap
Binary file not shown.
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5351,7 +5351,7 @@ open-editor@^1.2.0:
line-column-path "^1.0.0"
opn "^5.0.0"

opn@^5.0.0, opn@^5.4.0:
opn@^5.0.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035"
integrity sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==
Expand Down

0 comments on commit a9a11cc

Please sign in to comment.