GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - function-artisans/format-code: A CLI tool that formats code from stdin, and makes macOS shortcuts that format the code on the clipboard

BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
.editorconfig
.editorconfig
 
 
.envrc
.envrc
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
README.md
README.md
 
 
devenv.lock
devenv.lock
 
 
devenv.nix
devenv.nix
 
 
devenv.yaml
devenv.yaml
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

format-code

Formats source code from stdin and writes the formatted code to stdout.

Install

pnpm install
pnpm run build
pnpm add --global "$PWD"

Usage

format-code <language> [--print-width=100] [--sql-dialect=sql] < input

Languages: angular, css, glimmer, graphql, html, javascript, json, json5, less, lwc, markdown, mdx, scss, typescript, vue, yaml, sql, sql-output.

The sql-output language formats a SQL query and its result as two Markdown code blocks.

To format the code on the macOS clipboard, run:

pbpaste | format-code json | pbcopy

macOS shortcuts

To generate a signed shortcut for each language, run:

format-code shortcuts --sql-dialect postgresql

Each shortcut formats the code on the clipboard and copies the result back to the clipboard. The command writes the files to the current directory. To import a shortcut, open its file:

open "Format JSON.shortcut"

To see all the options, run format-code shortcuts --help.

Development

The project uses devenv to install Node.js and pnpm. To enter the dev shell, run:

devenv shell

If you use direnv, run direnv allow one time. Then direnv loads the dev shell when you enter the folder.

About

A CLI tool that formats code from stdin, and makes macOS shortcuts that format the code on the clipboard

Topics

code-formatterformattingmacosprettiershortcuts-appsql-formattertools

Resources

Readme
Activity
Custom properties

Stars

3 stars

Watchers

0 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.