Skip to content

Commit

Permalink
fix: upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
dword-design committed Jul 4, 2020
1 parent 774f571 commit 8193ea6
Show file tree
Hide file tree
Showing 12 changed files with 558 additions and 434 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
name: build

on:
push:
branches:
- '**'

- "**"
jobs:
cancel-existing:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.2.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ${{ matrix.os }}
needs: cancel-existing
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node: [10, 12]
os:
- macos-latest
- windows-latest
- ubuntu-latest
node:
- 10
- 12
exclude:
- os: macos-latest
node: 10
- os: windows-latest
node: 10
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: git config --global user.email "actions@github.com"
- run: git config --global user.name "GitHub Actions"
- run: yarn --frozen-lockfile
- run: yarn test
- name: Coveralls
if: matrix.os == 'ubuntu-latest' && matrix.node == 12
run: yarn dw-ci coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
COVERALLS_GIT_COMMIT: ${{ github.sha }}
COVERALLS_GIT_BRANCH: ${{ github.ref }}

release:
needs: test
if: github.ref == 'refs/heads/master'
Expand All @@ -41,7 +53,10 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 12
- run: git config --global user.email "actions@github.com"
- run: git config --global user.name "GitHub Actions"
- run: yarn --frozen-lockfile
- run: yarn lint
- name: Push changed files
run: yarn dw-ci push-changed-files
env:
Expand All @@ -51,5 +66,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn semantic-release
run: yarn semantic-release
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.DS_Store
/.babelrc.json
/.cz.json
/.editorconfig
/.env
/.env.json
/.eslintrc.json
/.nyc_output
/.releaserc.json
/.test.env.json
/.vscode
/coverage
/dist
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<!-- BADGES/ -->
[![NPM version](https://img.shields.io/npm/v/ceiling.svg)](https://npmjs.org/package/ceiling)
![Linux macOS Windows compatible](https://img.shields.io/badge/os-linux%20%7C%C2%A0macos%20%7C%C2%A0windows-blue)

[![Build status](https://img.shields.io/github/workflow/status/dword-design/ceiling/build)](https://github.com/dword-design/ceiling/actions)
[![Coverage status](https://img.shields.io/coveralls/dword-design/ceiling)](https://coveralls.io/github/dword-design/ceiling)
[![Dependency status](https://img.shields.io/david/dword-design/ceiling)](https://david-dm.org/dword-design/ceiling)
Expand All @@ -19,7 +18,7 @@ An extensible Node.js library and command-line tool to sync databases and files
<!-- /DESCRIPTION -->

<!-- INSTALL/ -->
# Install
## Install

```bash
# NPM
Expand All @@ -31,7 +30,7 @@ $ yarn add ceiling
<!-- /INSTALL -->

<!-- LICENSE/ -->
# License
## License

Unless stated otherwise all works are:

Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
],
"scripts": {
"commit": "base commit",
"depgraph": "base depgraph",
"dev": "base dev",
"lint": "base lint",
"prepare": "base prepare",
"prepublishOnly": "base prepublishOnly",
"release": "base release",
"test": "base test"
},
"dependencies": {
"@dword-design/functions": "^2.6.3",
"cosmiconfig": "^6.0.0",
"glob-promise": "^3.4.0",
"globby": "^11.0.1",
"inquirer": "^7.0.4",
"make-cli": "^1.0.4",
"plugin-name-to-package-name": "^0.1.1",
Expand All @@ -37,5 +37,8 @@
"p-event": "^4.1.0",
"strip-ansi": "^6.0.0",
"with-local-tmp-dir": "^2.2.5"
},
"publishConfig": {
"access": "public"
}
}
13 changes: 9 additions & 4 deletions src/cli.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
#!/usr/bin/env node

import { mapValues, omit, values } from '@dword-design/functions'
import makeCli from 'make-cli'

import commands from './commands'
import { omit, mapValues, values } from '@dword-design/functions'

makeCli({
commands: commands
commands:
commands
|> mapValues((command, name) => ({
...command |> omit('arguments'),
name: `${name}${command.arguments !== undefined ? ` ${command.arguments}` : ''}`,
...(command |> omit('arguments')),
handler: async (...args) => {
try {
return command.handler(...args) |> await
} catch (error) {
console.log(error.message)
process.exit(1)
}
return undefined
},
name: `${name}${
command.arguments === undefined ? '' : ` ${command.arguments}`
}`,
}))
|> values,
})
Loading

0 comments on commit 8193ea6

Please sign in to comment.