Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Prettier code formatting
on:
push:
branches: [master, format, format-tests]
pull_request:
branches: [master, format]
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Format
run: pretty-quick --staged
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4.1.2
with:
commit_message: Apply formatting changes
branch: ${{ github.head_ref }}
1 change: 1 addition & 0 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = async (argvs) => {
const argv = yargs_parser(argvs, {
alias: { release: ["r"], yes: ["y"] },
});
let tests = { example: "vlad" };
const timer = elapsed.start();
const version = (argv["release"] || "latest").toString();
const targetDir = path.resolve(argv["_"][0] || "./");
Expand Down
Loading