@fluid-app/fluid-cli-theme-dev 0.1.37 → 0.1.39
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
CHANGED
|
@@ -30,10 +30,16 @@ fluid theme dev
|
|
|
30
30
|
|
|
31
31
|
The dev server will:
|
|
32
32
|
|
|
33
|
-
1. Create (or reuse)
|
|
34
|
-
2.
|
|
35
|
-
3.
|
|
36
|
-
4.
|
|
33
|
+
1. Create (or reuse) an isolated development theme
|
|
34
|
+
2. Preserve pulled binary assets as ImageKit URL references without downloading or re-uploading their bytes
|
|
35
|
+
3. Keep editable source files (Liquid, CSS, JS, SVG, JSON) locally
|
|
36
|
+
4. Upload a newly added binary once, save its ImageKit URL reference, and remove its local bytes
|
|
37
|
+
5. Watch for source-file changes and sync them automatically
|
|
38
|
+
6. Proxy requests to `{company}.fluid.app` with local file overrides
|
|
39
|
+
|
|
40
|
+
For a pulled theme, a newly created dev theme is a server-side reference clone
|
|
41
|
+
of the pulled source. It preserves theme content and DAM/ImageKit references,
|
|
42
|
+
so initial dev startup does not reseed every asset from the working copy.
|
|
37
43
|
|
|
38
44
|
| Flag | Default | Description |
|
|
39
45
|
| -------------------------- | ----------- | ----------------------------------------- |
|
|
@@ -54,8 +60,15 @@ fluid theme push --theme "My Theme" # By name
|
|
|
54
60
|
fluid theme push --theme 42 # By ID
|
|
55
61
|
fluid theme push --publish # Push and publish
|
|
56
62
|
fluid theme push --nodelete # Keep remote files not present locally
|
|
63
|
+
fluid theme push --auto-baseline # First push without a baseline: record
|
|
64
|
+
# the server's current state as the
|
|
65
|
+
# baseline, then push only local diffs
|
|
57
66
|
```
|
|
58
67
|
|
|
68
|
+
Pushing into an existing theme requires a local baseline (recorded by `pull`, or migrated from a checksum-era `.fluid-theme.json`). Without one, push refuses so it can't silently clobber the server. `--auto-baseline` instead records the server's current state as the baseline — no local file is modified, files identical to the server aren't re-uploaded, and files that exist only on the server are never deleted — then pushes what differs locally. Mist Desktop's one-click Publish uses this flag.
|
|
69
|
+
|
|
70
|
+
Files containing unresolved `<<<<<<< / ======= / >>>>>>>` conflict markers are never uploaded; push lists them and exits (with a machine-readable `FLUID_THEME_PUSH_BLOCKED code=conflict_markers files=…` line under `--auto-baseline`).
|
|
71
|
+
|
|
59
72
|
### `fluid theme pull`
|
|
60
73
|
|
|
61
74
|
Download a remote theme to your local directory:
|
|
@@ -64,8 +77,13 @@ Download a remote theme to your local directory:
|
|
|
64
77
|
fluid theme pull # Interactive theme selection
|
|
65
78
|
fluid theme pull --theme "My Theme" # By name or ID
|
|
66
79
|
fluid theme pull --nodelete # Keep local files not present on remote
|
|
80
|
+
fluid theme pull --resolve remote # Auto-resolve conflicts to the server's
|
|
81
|
+
# side (or `--resolve local` to keep
|
|
82
|
+
# yours) instead of writing markers
|
|
67
83
|
```
|
|
68
84
|
|
|
85
|
+
By default, conflicting edits (changed locally _and_ on the server since the last sync) are written with git-style conflict markers for you to resolve. For non-interactive use, `--resolve local` keeps your side of each conflicting hunk and `--resolve remote` takes the server's; before any auto-resolution overwrites local content, the pre-merge working tree is committed to the theme's shadow history (`.fluid-theme/repo`) so the discarded side stays restorable.
|
|
86
|
+
|
|
69
87
|
### `fluid theme init`
|
|
70
88
|
|
|
71
89
|
Scaffold a new theme from the base template:
|
|
@@ -100,10 +118,33 @@ Existing skills are left untouched unless you confirm the overwrite (or pass `--
|
|
|
100
118
|
|
|
101
119
|
## Theme Directory Structure
|
|
102
120
|
|
|
103
|
-
A valid theme directory must contain at least one of: `templates/`, `assets/`,
|
|
121
|
+
A valid theme directory must contain at least one of: `templates/`, `assets/`,
|
|
122
|
+
`config/`, or the asset reference manifest `.fluid-assets.json`.
|
|
104
123
|
|
|
105
124
|
Use a `.fluidignore` file (same syntax as `.gitignore`) to exclude files from syncing.
|
|
106
125
|
|
|
126
|
+
### Remote binary assets
|
|
127
|
+
|
|
128
|
+
`fluid theme pull` keeps binary assets such as images, fonts, video, and PDFs
|
|
129
|
+
remote rather than downloading them into `assets/`. Their ImageKit URL
|
|
130
|
+
reference metadata is recorded in `.fluid-assets.json`. The CLI uses that
|
|
131
|
+
manifest when it starts a dev theme or pushes to another theme, so existing
|
|
132
|
+
`asset_url` calls continue to resolve normally without local binary copies.
|
|
133
|
+
|
|
134
|
+
When a developer adds a new binary file during `fluid theme dev`, the CLI
|
|
135
|
+
uploads it once, records its ImageKit URL reference in the manifest, and
|
|
136
|
+
removes its local bytes after the theme resource has been saved. A later
|
|
137
|
+
`fluid theme push` writes that same ImageKit URL into the selected target theme
|
|
138
|
+
without a second binary upload.
|
|
139
|
+
|
|
140
|
+
Binary assets must be direct children of `assets/` (for example,
|
|
141
|
+
`assets/logo.png`); nested asset directories are not supported by the theme
|
|
142
|
+
resource API.
|
|
143
|
+
|
|
144
|
+
Do not add `.fluid-assets.json` to `.fluidignore`; it is already excluded from
|
|
145
|
+
theme uploads and file watching. Commit it with the theme source so every
|
|
146
|
+
developer receives the same remote asset references.
|
|
147
|
+
|
|
107
148
|
## Development
|
|
108
149
|
|
|
109
150
|
For contributors working in `fluid-mono`:
|