Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
fix: use @anycli/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 6, 2018
1 parent 79c6f5a commit feb3c0f
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Expand Up @@ -16,8 +16,8 @@ jobs:
- v0-yarn-{{checksum ".circleci/config.yml"}}
- run: .circleci/greenkeeper
- run: yarn add -D nyc@11 @anycli/nyc-config@0 mocha-junit-reporter@1 @commitlint/cli@6 @commitlint/config-conventional@6
# - run: ./bin/run -v
# - run: ./bin/run --help
- run: ./bin/run -v
- run: ./bin/run --help
- run: |
mkdir -p reports
$NYC yarn test --reporter mocha-junit-reporter
Expand Down
4 changes: 2 additions & 2 deletions .circleci/greenkeeper
Expand Up @@ -6,7 +6,7 @@ PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH

if [[ "$CIRCLE_BRANCH" != greenkeeper/* ]]; then
yarn
yarn check
# yarn check
exit 0
fi

Expand All @@ -21,5 +21,5 @@ if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
fi

greenkeeper-lockfile-update
yarn install
yarn
greenkeeper-lockfile-upload
10 changes: 2 additions & 8 deletions bin/run
@@ -1,10 +1,4 @@
#!/usr/bin/env node

const fs = require('fs')
const path = require('path')
if (fs.existsSync(path.join(__dirname, '../src/index.ts'))) {
require('ts-node/register')
require('../src').default.run()
} else {
require('..').default.run()
}
require('@anycli/command').run()
.catch(require('@anycli/errors/handle'))
18 changes: 11 additions & 7 deletions package.json
Expand Up @@ -14,13 +14,15 @@
},
"bugs": "https://github.com/anycli/dev-cli/issues",
"dependencies": {
"@anycli/command": "^1.2.5",
"@anycli/config": "^1.1.8",
"@anycli/plugin-help": "^0.6.2"
"@anycli/command": "^1.2.9",
"@anycli/config": "^1.3.10",
"@anycli/errors": "^0.2.0",
"@anycli/plugin-help": "^0.6.3"
},
"devDependencies": {
"@anycli/test": "^0.10.10",
"@anycli/tslint": "^0.2.5",
"@anycli/dev-cli": "^0.1.6",
"@anycli/test": "^0.10.11",
"@anycli/tslint": "^0.2.6",
"@types/chai": "^4.1.2",
"@types/fs-extra": "^5.0.0",
"@types/mocha": "^2.2.48",
Expand All @@ -37,6 +39,7 @@
"node": ">=8.0.0"
},
"files": [
".anycli.manifest.json",
"/bin",
"/lib"
],
Expand All @@ -49,9 +52,10 @@
"repository": "anycli/dev-cli",
"scripts": {
"build": "rm -rf lib && tsc",
"lint": "concurrently -p command \"tsc -p test --noEmit\" \"tslint -p test\"",
"lint": "concurrently -p command \"tsc -p test --noEmit\" \"tslint -p test -t stylish\"",
"postpublish": "rm .anycli.manifest.json",
"posttest": "yarn run lint",
"prepublishOnly": "yarn run build",
"prepublishOnly": "yarn run build && anycli-dev manifest",
"test": "mocha --forbid-only \"test/**/*.test.ts\""
},
"types": "lib/index.d.ts"
Expand Down
4 changes: 1 addition & 3 deletions src/index.ts
@@ -1,3 +1 @@
import {Main} from '@anycli/command'

export default class extends Main {}
export {run} from '@anycli/command'
52 changes: 42 additions & 10 deletions yarn.lock
Expand Up @@ -8,15 +8,43 @@
dependencies:
"@anycli/parser" "^3.2.4"

"@anycli/config@^1.1.8":
version "1.1.8"
resolved "https://registry.yarnpkg.com/@anycli/config/-/config-1.1.8.tgz#986eedd29ec8ccecb5454d080c16e65c37ae28e5"
"@anycli/command@^1.2.9":
version "1.2.9"
resolved "https://registry.yarnpkg.com/@anycli/command/-/command-1.2.9.tgz#6db08fbb3537c8cc2f616415fcd6360043750f38"
dependencies:
"@anycli/parser" "^3.2.5"

"@anycli/config@^1.1.8", "@anycli/config@^1.3.10":
version "1.3.10"
resolved "https://registry.yarnpkg.com/@anycli/config/-/config-1.3.10.tgz#8d821fe8a60ec400dd49d9b1a12f7062e590dd4f"

"@anycli/dev-cli@^0.1.6":
version "0.1.6"
resolved "https://registry.yarnpkg.com/@anycli/dev-cli/-/dev-cli-0.1.6.tgz#bb27980fe2cfb26f889768006c26735350fdfe28"
dependencies:
"@anycli/command" "^1.2.5"
"@anycli/config" "^1.1.8"
"@anycli/plugin-help" "^0.6.2"

"@anycli/errors@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@anycli/errors/-/errors-0.2.0.tgz#ee421115dcdb499d76de9d4853718c06e1c5d5f0"
dependencies:
clean-stack "^1.3.0"
fs-extra "^5.0.0"
indent-string "^3.2.0"
strip-ansi "^4.0.0"
wrap-ansi "^3.0.1"

"@anycli/parser@^3.2.4":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-3.2.4.tgz#30297ac2fa225b37efaab5c0062bf189988b3ce8"

"@anycli/plugin-help@^0.6.2":
"@anycli/parser@^3.2.5":
version "3.2.5"
resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-3.2.5.tgz#d0e7ddb14945cb84377fa69095009ca6005e6b6d"

"@anycli/plugin-help@^0.6.2", "@anycli/plugin-help@^0.6.3":
version "0.6.3"
resolved "https://registry.yarnpkg.com/@anycli/plugin-help/-/plugin-help-0.6.3.tgz#e365947b69ce232cbd49fcda934dd53852d2503f"
dependencies:
Expand All @@ -28,15 +56,15 @@
widest-line "^2.0.0"
wrap-ansi "^3.0.1"

"@anycli/test@^0.10.10":
version "0.10.10"
resolved "https://registry.yarnpkg.com/@anycli/test/-/test-0.10.10.tgz#1b43d394c13f42e05dffdebecdf352dc51f920d1"
"@anycli/test@^0.10.11":
version "0.10.11"
resolved "https://registry.yarnpkg.com/@anycli/test/-/test-0.10.11.tgz#0d1004c8c0b34a8853ee7a3a26c90ed12ce6e42f"
dependencies:
fancy-test "^1.0.1"

"@anycli/tslint@^0.2.5":
version "0.2.5"
resolved "https://registry.yarnpkg.com/@anycli/tslint/-/tslint-0.2.5.tgz#63feeb981b11f36326e0cb745c62f51d55c2ed67"
"@anycli/tslint@^0.2.6":
version "0.2.6"
resolved "https://registry.yarnpkg.com/@anycli/tslint/-/tslint-0.2.6.tgz#4251f4cb3744dc577309b4351d2c2e8b65072de2"
dependencies:
tslint "^5.9.1"
tslint-xo "^0.6.0"
Expand Down Expand Up @@ -187,6 +215,10 @@ check-error@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"

clean-stack@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-1.3.0.tgz#9e821501ae979986c46b1d66d2d432db2fd4ae31"

color-convert@^1.9.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
Expand Down

0 comments on commit feb3c0f

Please sign in to comment.