Skip to content

Commit f572e08

Browse files
committed
Replace the Raycast extension with a CLI
1 parent 2b434a1 commit f572e08

31 files changed

Lines changed: 931 additions & 1974 deletions

‎.gitignore‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
# dependencies
44
/node_modules
55

6-
# Raycast specific files
7-
raycast-env.d.ts
6+
# build output
7+
/dist
88

99
# misc
1010
.DS_Store
11+
12+
# devenv
13+
.devenv
14+
.devenv.flake.nix

‎README.md‎

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
11
# format-code
22

3-
Formats source code of various languages from your clipboard and copies that back to the clipboard in the formatted way.
3+
Formats source code from stdin and writes the formatted code to stdout.
4+
5+
## Install
6+
7+
```sh
8+
npm install
9+
npm run build
10+
npm link
11+
```
12+
13+
## Usage
14+
15+
```sh
16+
format-code <language> [--print-width 100] [--sql-dialect sql] < input
17+
```
18+
19+
Languages: `angular`, `css`, `glimmer`, `graphql`, `html`, `javascript`, `json`,
20+
`json5`, `less`, `lwc`, `markdown`, `mdx`, `scss`, `typescript`, `vue`, `yaml`,
21+
`sql`, `sql-output`.
22+
23+
The `sql-output` language formats a SQL query and its result as two Markdown code
24+
blocks.
25+
26+
To format the code on the macOS clipboard, run:
27+
28+
```sh
29+
pbpaste | format-code json | pbcopy
30+
```

‎assets/icon.png‎

-56.9 KB
Binary file not shown.

‎eslint.config.mjs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// @ts-check
2+
3+
import js from '@eslint/js';
4+
import { defineConfig } from 'eslint/config';
5+
import tseslint from 'typescript-eslint';
6+
7+
export default defineConfig(
8+
js.configs.recommended,
9+
tseslint.configs.recommended,
10+
);

0 commit comments

Comments
 (0)