frontend-guardian 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -25
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,37 +1,26 @@
|
|
|
1
1
|
# frontend-guardian (CLI)
|
|
2
2
|
|
|
3
|
-
Scan
|
|
3
|
+
Scan engine for **Frontend Guardian**.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**What is Frontend Guardian?** It helps frontend teams keep UIs consistent. After you ship, spacing, borders, colors, and components often drift. This tool scans your code (Tailwind, JSX/TSX) and flags inconsistent spacing, arbitrary colors, mixed border-radius, duplicate components, and similar issues so you can fix them before they pile up.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npx frontend-guardian . # scan current dir
|
|
9
|
-
npx frontend-guardian ./src # scan ./src
|
|
10
|
-
npx frontend-guardian . --fail-on-score 70 # exit 1 if score < 70 (for CI)
|
|
11
|
-
npx frontend-guardian . --json # output JSON
|
|
12
|
-
npx frontend-guardian . --suggest # AI fix suggestions (hosted API or GEMINI_API_KEY)
|
|
13
|
-
npx frontend-guardian init # add .github/workflows/frontend-guardian.yml to repo
|
|
14
|
-
```
|
|
7
|
+
Use this package only if you want to run the scanner from your own Node code (programmatic use).
|
|
15
8
|
|
|
16
|
-
|
|
9
|
+
**Most users:** run the CLI instead (no install):
|
|
17
10
|
|
|
18
11
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# or
|
|
22
|
-
node packages/cli/dist/cli.js .
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Publish to npm
|
|
12
|
+
# Scan current folder for Tailwind/component consistency
|
|
13
|
+
npx frontend-guardian .
|
|
26
14
|
|
|
27
|
-
|
|
15
|
+
# Add GitHub Actions workflow to run the check on push/PR
|
|
16
|
+
npx frontend-guardian init
|
|
28
17
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
cd packages/core && npm publish --access public
|
|
32
|
-
cd packages/cli && npm publish --access public
|
|
18
|
+
# Same scan + AI fix suggestions
|
|
19
|
+
npx frontend-guardian . --suggest
|
|
33
20
|
```
|
|
34
21
|
|
|
35
|
-
|
|
22
|
+
**Install (optional)** — only if you're embedding the scanner in your app:
|
|
36
23
|
|
|
37
|
-
|
|
24
|
+
```bash
|
|
25
|
+
npm i @justinmoto/frontend-guardian-core
|
|
26
|
+
```
|