linework-cli 0.1.0 → 0.1.1

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.
Files changed (3) hide show
  1. package/README.md +68 -15
  2. package/package.json +5 -2
  3. package/src/cli.mjs +5 -1
package/README.md CHANGED
@@ -1,29 +1,82 @@
1
1
  # linework-cli
2
2
 
3
- Official CLI for [Linework](https://linework.rdev.web.id) semantic vector icons and product illustrations.
3
+ Official CLI for **[Linework](https://linework.rdev.web.id)** — semantic SVG icons and editorial illustrations engineered for React, Next.js, Vite, Astro, Remix, and React Router.
4
4
 
5
- Initialize semantic `--rdev-*` CSS variables and pull live TSX components or full React packages straight into Next.js, Vite, Astro, Remix, or React Router apps.
5
+ Initialize semantic `--rdev-*` light/dark CSS tokens and pull live TSX components or full React packages straight into your project. Newly published icons and illustrations on Linework are available immediately through the CLI without waiting for CLI releases.
6
+
7
+ ---
6
8
 
7
9
  ## Quick Start
8
10
 
11
+ Initialize `linework.json` and configure all 5 semantic CSS custom properties:
12
+
9
13
  ```bash
10
- # Initialize semantic tokens & linework.json
14
+ # pnpm
11
15
  pnpm dlx linework-cli@latest init -t next
12
16
 
13
- # Add individual zero-dependency TSX icons or illustrations
17
+ # npm
18
+ npx linework-cli@latest init -t next
19
+
20
+ # yarn
21
+ yarn dlx linework-cli@latest init -t next
22
+
23
+ # bun
24
+ bunx --bun linework-cli@latest init -t next
25
+ ```
26
+
27
+ Supported framework presets (`-t`): `next`, `vite`, `astro`, `remix`, `react-router`, `react`.
28
+
29
+ ---
30
+
31
+ ## Add Icons & Illustrations (`add`)
32
+
33
+ Pull typed, zero-dependency TSX component files straight from the live Linework registry into `src/components/linework/` (or your custom `--dir`):
34
+
35
+ ```bash
14
36
  pnpm dlx linework-cli@latest add friendly-ghost shield-check
37
+ ```
15
38
 
16
- # Or install the full auto-updated React packages directly
17
- pnpm dlx linework-cli@latest init -t next --install
39
+ Options:
40
+ - `--size <px>` — Default SVG width/height (default `48`)
41
+ - `-o, --dir <path>` — Custom output directory
42
+ - `--overwrite` — Replace existing `.tsx` files
43
+ - `--all-illustrations` — Pull all free illustrations at once
44
+
45
+ ---
46
+
47
+ ## Search & Sync
48
+
49
+ ```bash
50
+ # Search live icons & illustrations from the terminal
51
+ pnpm dlx linework-cli@latest search astronaut --type illustration
52
+
53
+ # Refresh installed @rdev/icons-react & @rdev/illustrations-react .tgz packages
54
+ pnpm dlx linework-cli@latest sync
18
55
  ```
19
56
 
20
- ## Commands
57
+ ---
58
+
59
+ ## 5 Semantic Color Tokens
60
+
61
+ Every icon and illustration automatically maps paths to 5 theme tokens configured by `linework-cli init`:
62
+
63
+ | Token | CSS Variable | Role |
64
+ |---|---|---|
65
+ | `primary` | `--rdev-primary` | Dominant fill / foreground subject |
66
+ | `secondary` | `--rdev-secondary` | Supporting planes & depth |
67
+ | `accent` | `--rdev-accent` | Warm highlights & badges |
68
+ | `outline` | `--rdev-outline` | Structural ink contours |
69
+ | `highlight` | `--rdev-highlight` | Specular paper/card shine |
70
+
71
+ ---
72
+
73
+ ## Documentation
74
+
75
+ - Introduction: https://linework.rdev.web.id/docs
76
+ - Installation Guide: https://linework.rdev.web.id/docs/installation
77
+ - CLI Reference: https://linework.rdev.web.id/docs/cli
78
+ - State Page Builder (404 / 500): https://linework.rdev.web.id/builder
79
+
80
+ ## License
21
81
 
22
- - `init [-t next|vite|astro|remix|react-router|react] [--dir <path>] [--install] [--no-css] [--yes]`
23
- Creates `linework.json`, injects `--rdev-*` semantic light & dark tokens into your global CSS, and optionally installs `@rdev/icons-react` + `@rdev/illustrations-react`.
24
- - `add <slug...> [-o <dir>] [--size <px>] [--overwrite] [--all-illustrations]`
25
- Fetches ready-to-use PascalCase TSX component files directly from the live Linework registry.
26
- - `search <query> [--type icon|illustration] [--limit <n>]`
27
- Searches published assets from the terminal.
28
- - `sync`
29
- Updates `@rdev/icons-react` and `@rdev/illustrations-react` in `node_modules` with newly published assets.
82
+ MIT — RDEV Studio
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linework-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "CLI for initializing Linework semantic color tokens and adding live vector icons and illustrations to React projects.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,6 +34,9 @@
34
34
  "node": ">=18.0.0"
35
35
  },
36
36
  "scripts": {
37
- "test": "node --test tests/*.test.mjs"
37
+ "test": "node --test tests/*.test.mjs",
38
+ "prepublishOnly": "npm test",
39
+ "release:patch": "npm version patch && npm publish --access public",
40
+ "release:minor": "npm version minor && npm publish --access public"
38
41
  }
39
42
  }
package/src/cli.mjs CHANGED
@@ -2,8 +2,12 @@ import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { spawnSync } from 'node:child_process';
4
4
 
5
+ const PKG_JSON = JSON.parse(
6
+ fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8'),
7
+ );
8
+
5
9
  export const DEFAULT_REGISTRY_URL = 'https://linework.rdev.web.id';
6
- export const CLI_VERSION = '0.1.0';
10
+ export const CLI_VERSION = String(PKG_JSON.version || '0.0.0');
7
11
 
8
12
  const TOKEN_BLOCK_START = '/* linework-tokens:start */';
9
13
  const TOKEN_BLOCK_END = '/* linework-tokens:end */';