@axerity/cli 0.1.2 → 0.1.3

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/bin/axerity.js CHANGED
@@ -233,7 +233,7 @@ function init() {
233
233
  const files = {
234
234
  'axerity.json': `${JSON.stringify(
235
235
  {
236
- $schema: 'https://axerity.com/axerity.schema.json',
236
+ $schema: 'https://unpkg.com/@axerity/cli/axerity.schema.json',
237
237
  name: 'My Docs',
238
238
  description: 'Documentation built with Axerity.',
239
239
  theme: 'neutral',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axerity/cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A documentation site generator built with Svelte.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -59,6 +59,7 @@
59
59
  "@tailwindcss/forms": "^0.5.11",
60
60
  "@tailwindcss/typography": "^0.5.19",
61
61
  "@tailwindcss/vite": "^4.3.0",
62
+ "lucide": "^1.17.0",
62
63
  "mdsvex": "^0.12.7",
63
64
  "mermaid": "^11.15.0",
64
65
  "rehype-slug": "^6.0.0",
@@ -18,8 +18,8 @@ axerity build # build the static site
18
18
  axerity preview # preview the production build
19
19
  ```
20
20
 
21
- Run them with `npx axerity <command>`, or install globally with
22
- `npm install -g axerity` and call `axerity` directly.
21
+ Run them with `pnpm dlx @axerity/cli <command>` (or `npx @axerity/cli <command>`),
22
+ or add `@axerity/cli` as a dev dependency and call `axerity` through your scripts.
23
23
 
24
24
  ## init
25
25
 
@@ -35,12 +35,14 @@ example `axerity dev --port 4000`.
35
35
 
36
36
  ## build
37
37
 
38
- `axerity build` produces a static site. Every page is prerendered to HTML, and
39
- the search index, `llms.txt`, sitemap, RSS feed, and OpenGraph images are all
40
- written out, ready to host anywhere.
38
+ `axerity build` produces a static site in `build/`. Every page is prerendered to
39
+ HTML, and the search index, `llms.txt`, sitemap, RSS feed, and OpenGraph images
40
+ are all written out, ready to host anywhere.
41
41
 
42
42
  ## How it works
43
43
 
44
- The CLI never touches your content. It assembles a hidden `.axerity` workspace
45
- that pairs the packaged engine with your `docs/` folder and `axerity.json`, then
46
- runs Vite there. Add `.axerity` to your `.gitignore`; `init` does this for you.
44
+ The engine runs from its own install, not from your repo. When you run a command,
45
+ Axerity reads your `docs/` and `axerity.json` and renders against them, then
46
+ writes the result to `build/` in your project. Your content is the source of
47
+ truth and nothing else in your folder is touched, so there is no workspace to
48
+ gitignore beyond `build/`.
@@ -40,7 +40,7 @@ Settings and set the Framework Preset to **Other**.
40
40
 
41
41
  In the Pages project settings:
42
42
 
43
- - **Build command:** `npx axerity build`
43
+ - **Build command:** `npx @axerity/cli build`
44
44
  - **Build output directory:** `build`
45
45
  - **Framework preset:** None
46
46
 
@@ -50,7 +50,7 @@ Cloudflare serves clean URLs automatically.
50
50
 
51
51
  ```toml title="netlify.toml"
52
52
  [build]
53
- command = "npx axerity build"
53
+ command = "npx @axerity/cli build"
54
54
  publish = "build"
55
55
  ```
56
56
 
@@ -59,7 +59,7 @@ Netlify serves clean URLs (pretty URLs) by default.
59
59
  ## GitHub Pages
60
60
 
61
61
  Build, then publish the `build/` folder (for example with a GitHub Action that
62
- runs `npx axerity build` and uploads `build/` as the Pages artifact).
62
+ runs `npx @axerity/cli build` and uploads `build/` as the Pages artifact).
63
63
 
64
64
  Project sites are served from `https://<user>.github.io/<repo>/`, a sub-path, so
65
65
  set the base in `axerity.json`:
@@ -6,35 +6,52 @@ icon: download
6
6
 
7
7
  # Installation
8
8
 
9
- Axerity is a CLI. You do not clone or fork anything. Install it, scaffold a site,
10
- and start writing Markdown.
9
+ Axerity is a CLI. You do not clone or fork anything. Run it, scaffold a site, and
10
+ start writing Markdown.
11
11
 
12
12
  ## Requirements
13
13
 
14
- - Node.js 20 or newer
14
+ - Node.js 24 or newer
15
15
 
16
16
  ## Create a site
17
17
 
18
18
  Scaffold a new site with `init`, then start the dev server:
19
19
 
20
20
  ```bash
21
- npx axerity init my-docs
21
+ pnpm dlx @axerity/cli init my-docs
22
22
  cd my-docs
23
- npx axerity dev
23
+ pnpm dlx @axerity/cli dev
24
24
  ```
25
25
 
26
- Your site is running at `http://localhost:5173`. Or install it globally and drop
27
- the `npx`:
26
+ Your site is running at `http://localhost:5173`. `pnpm dlx` runs the CLI without
27
+ installing it. `npx @axerity/cli <command>` works the same way.
28
+
29
+ ## Install it
30
+
31
+ For a project you build often, add it as a dev dependency so the version is
32
+ pinned:
28
33
 
29
34
  ```bash
30
- npm install -g axerity
31
- axerity init my-docs
35
+ pnpm add -D @axerity/cli
36
+ ```
37
+
38
+ Then wire up scripts in your `package.json`:
39
+
40
+ ```json
41
+ {
42
+ "scripts": {
43
+ "dev": "axerity dev",
44
+ "build": "axerity build",
45
+ "preview": "axerity preview"
46
+ }
47
+ }
32
48
  ```
33
49
 
50
+ Now `pnpm dev` and `pnpm build` just work, no global install or PATH setup.
51
+
34
52
  ## Project layout
35
53
 
36
- A site is just your content and one config file. Everything else lives in the
37
- package:
54
+ A site is your content and one config file:
38
55
 
39
56
  ```
40
57
  my-docs/
@@ -44,6 +61,6 @@ my-docs/
44
61
  ```
45
62
 
46
63
  Write Markdown in `docs/`, order pages with `meta.json`, and configure the site
47
- in [`axerity.json`](/configuration). The CLI builds a hidden `.axerity`
48
- workspace to run the engine against your content, so add `.axerity` to your
49
- `.gitignore` (the scaffold does this for you).
64
+ in [`axerity.json`](/configuration). The engine runs from its own install, so the
65
+ only thing Axerity ever creates in your project is the `build/` folder. The
66
+ scaffold adds it to your `.gitignore` for you.
@@ -1,8 +1,8 @@
1
1
  <script lang="ts" module>
2
- import type { Component } from 'svelte';
3
- import * as icons from '@lucide/svelte';
2
+ import { icons } from 'lucide';
4
3
 
5
- const registry = icons as unknown as Record<string, Component>;
4
+ type IconNode = [string, Record<string, string | number>][];
5
+ const registry = icons as unknown as Record<string, IconNode>;
6
6
 
7
7
  const pascal = (name: string) =>
8
8
  name
@@ -18,9 +18,24 @@
18
18
  class: className = ''
19
19
  }: { name?: string; size?: number; class?: string } = $props();
20
20
 
21
- const Icon = $derived(name ? registry[pascal(name)] : undefined);
21
+ const node = $derived(name ? registry[pascal(name)] : undefined);
22
22
  </script>
23
23
 
24
- {#if Icon}
25
- <Icon {size} class={className} />
24
+ {#if node}
25
+ <svg
26
+ xmlns="http://www.w3.org/2000/svg"
27
+ width={size}
28
+ height={size}
29
+ viewBox="0 0 24 24"
30
+ fill="none"
31
+ stroke="currentColor"
32
+ stroke-width="2"
33
+ stroke-linecap="round"
34
+ stroke-linejoin="round"
35
+ class={`lucide ${className}`}
36
+ >
37
+ {#each node as [tag, attrs], i (i)}
38
+ <svelte:element this={tag} {...attrs} />
39
+ {/each}
40
+ </svg>
26
41
  {/if}