feature:sync-template
Introduction
feature:sync-template brings the scaffold files SPLENT owns in a feature up to the current templates, without touching your code. Run it after a CLI upgrade, when feature:drift reports a difference.
splent feature:sync-template notes
Files to update (1):
MANIFEST.in (3 line(s) changed)
Proceed with update? [y/N]: y
✔ MANIFEST.in
Done.
Previewing the changes
splent feature:sync-template notes --dry-run
It lists the files that differ and writes nothing. Add --yes to update them without the prompt.
What it updates
| Feature | Files SPLENT owns |
|---|---|
With frontend/ |
.gitignore, MANIFEST.in, frontend/.npmrc |
Without frontend/ |
.gitignore, MANIFEST.in, src/<namespace>/<feature>/assets/js/webpack.config.js |
Only a file that exists and differs is rewritten, so a feature without a webpack.config.js does not get one. Your sources, templates, scripts.js and pyproject.toml are never touched. For the contract, use feature:contract.
It writes to the editable copy at the workspace root, or an unversioned copy in .splent_cache. A pinned snapshot is never modified.
Reference
Arguments and options
| Argument / Option | Description |
|---|---|
FEATURE_IDENTIFIER |
A short name (notes), a package name (splent_feature_notes), or either under a namespace (splent-io/notes) |
--dry-run |
Show what would change and write nothing |
--yes |
Skip the confirmation prompt |
Errors
Each of these exits 1.
| Message | What to do |
|---|---|
<name>@<version> is a pinned snapshot in .splent_cache, which is never modified. |
Run feature:unlock <name>, then sync the editable copy |
Feature '<name>' not found at the workspace root or in .splent_cache. |
Check the name |
Refusing to write to <path>: it is not an editable feature copy ... |
The copy resolves elsewhere, such as a link into a snapshot. Unlock the feature |
Could not write <file>: <reason> |
Fix the file’s permissions and run again |
Requirements
- A selected product (
SPLENT_APP).
See also
feature:driftshows what drifted before you sync.product:sync-templatedoes the same for products.