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

Commit

Permalink
fix: remove extra newline from styledJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 2, 2018
1 parent 83f0f3d commit 8ce11fc
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 142 deletions.
40 changes: 24 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,46 @@ jobs:
docker:
- image: node:latest
working_directory: ~/cli
environment:
NYC: "yarn exec nyc -- --nycrc-path node_modules/@anycli/nyc-config/.nycrc"
MOCHA_FILE: "reports/mocha.xml"
steps:
- checkout
- restore_cache: &restore_cache
keys:
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-
- v0-yarn-{{checksum ".circleci/config.yml"}}-master-
- run: .circleci/test
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}}
- 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: |
mkdir -p reports
$NYC yarn test --reporter mocha-junit-reporter
$NYC report --reporter text-lcov > coverage.lcov
curl -s https://codecov.io/bash | bash
- run: yarn exec commitlint -- -x @commitlint/config-conventional --from origin/master
- store_test_results: &store_test_results
path: ~/cli/reports
- save_cache: &save_cache
key: v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
paths:
- ~/cli/node_modules
- /usr/local/share/.cache/yarn
- /usr/local/share/.config/yarn
node-8:
<<: *test
docker:
- image: node:8
steps:
- checkout
- restore_cache: *restore_cache
- run: .circleci/test
- store_test_results: *store_test_results
release:
<<: *test
steps:
- add_ssh_keys
- checkout
- restore_cache: *restore_cache
- run: .circleci/release
- run: yarn global add @anycli/semantic-release@1 semantic-release@12
- run: yarn --frozen-lockfile
- run: |
export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
semantic-release -e @anycli/semantic-release
- save_cache:
key: v0-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
paths:
- ~/cli/node_modules
- /usr/local/share/.cache/yarn
- /usr/local/share/.config/yarn

workflows:
version: 2
Expand Down
25 changes: 25 additions & 0 deletions .circleci/greenkeeper
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

set -ex

PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH

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

if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
git config --global push.default simple
git config --global user.email "$GIT_EMAIL"
git config --global user.name "$GIT_USERNAME"
fi

if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
yarn global add greenkeeper-lockfile@1
fi

greenkeeper-lockfile-update
yarn install
greenkeeper-lockfile-upload
11 changes: 0 additions & 11 deletions .circleci/release

This file was deleted.

12 changes: 0 additions & 12 deletions .circleci/setup_git

This file was deleted.

29 changes: 0 additions & 29 deletions .circleci/test

This file was deleted.

9 changes: 3 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ cache:

install:
- ps: Install-Product node $env:nodejs_version x64
- git submodule sync
- git submodule update --init --recursive
- git config --global user.email "[email protected]"
- git config --global user.name "anycli"
- yarn add -D nyc @anycli/nyc-config
- yarn add -D nyc@11 @anycli/nyc-config@0
test_script:
- yarn test
- .\node_modules\.bin\nyc --nycrc-path node_modules/@anycli/nyc-config/.nycrc yarn test
after_test:
- .\node_modules\.bin\nyc --nycrc-path node_modules/@anycli/nyc-config/.nycrc report --reporter text-lcov > coverage.lcov
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
Expand Down
53 changes: 0 additions & 53 deletions package-scripts.js

This file was deleted.

17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
"supports-color": "^5.1.0"
},
"devDependencies": {
"@anycli/tslint": "^0.2.1",
"@commitlint/cli": "^6.0.5",
"@commitlint/config-conventional": "^6.0.4",
"@anycli/tslint": "^0.2.2",
"@types/ansi-styles": "^2.0.30",
"@types/chai": "^4.1.2",
"@types/clean-stack": "^1.3.0",
Expand All @@ -41,14 +39,12 @@
"@types/strip-ansi": "^3.0.0",
"@types/supports-color": "^3.1.0",
"chai": "^4.1.2",
"concurrently": "^3.5.1",
"eslint": "^4.16.0",
"eslint-config-anycli": "^1.3.1",
"fancy-test": "^0.6.6",
"husky": "^0.14.3",
"mocha": "^5.0.0",
"mocha-junit-reporter": "^1.17.0",
"nps": "^5.7.1",
"nps-utils": "^1.5.0",
"ts-node": "^4.1.0",
"typescript": "^2.7.1"
},
Expand All @@ -66,10 +62,11 @@
"main": "lib/index.js",
"repository": "anycli/cli-ux",
"scripts": {
"commitmsg": "commitlint -x @commitlint/config-conventional -e $GIT_PARAMS",
"precommit": "nps lint -l warn",
"prepublishOnly": "nps build",
"test": "nps test -l warn"
"build": "rm -rf lib && tsc",
"lint": "concurrently -p command \"eslint .\" \"tsc -p test --noEmit\" \"tslint -p test\"",
"posttest": "yarn run lint",
"prepublishOnly": "yarn run build",
"test": "mocha --forbid-only \"test/**/*.test.ts\""
},
"types": "lib/index.d.ts"
}
2 changes: 1 addition & 1 deletion src/styled/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export default function styledJSON(obj: any) {
}
let cardinal = require('cardinal')
let theme = require('cardinal/themes/jq')
cli.info(cardinal.highlight(json, {json: true, theme}) + '\n')
cli.info(cardinal.highlight(json, {json: true, theme}))
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "./lib",
"pretty": true,
"rootDirs": [
"./src"
],
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
version "0.0.3"
resolved "https://registry.yarnpkg.com/@anycli/screen/-/screen-0.0.3.tgz#f0afd970c3ed725702948a45a874ede1fdd9362e"

"@anycli/tslint@^0.2.1":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@anycli/tslint/-/tslint-0.2.1.tgz#17295a3a4c579884cd3aea7ed1d8c07d11ecc624"
"@anycli/tslint@^0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@anycli/tslint/-/tslint-0.2.2.tgz#46e899f58019600fc6a7191e7fde47d6b4513df1"
dependencies:
tslint "^5.9.1"
tslint-xo "^0.6.0"
Expand Down Expand Up @@ -525,7 +525,7 @@ concat-stream@^1.6.0:
readable-stream "^2.2.2"
typedarray "^0.0.6"

concurrently@^3.4.0:
concurrently@^3.4.0, concurrently@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-3.5.1.tgz#ee8b60018bbe86b02df13e5249453c6ececd2521"
dependencies:
Expand Down

0 comments on commit 8ce11fc

Please sign in to comment.