Develop on a draft, publish when you mean it
The two commands I actually use. One shows the theme to me. The other is how it reaches a customer, and only when I pass --apply.
I work on the storefront at Feeef. After a theme folder exists, I only want two commands in my head. I kept getting them backwards, so this is the note I wanted on the wall.
npm run dev is for me. npm run publish -- --apply is for customers. Everything else
is a variation of those two.
The afternoon loop
I edit a TSX file, a locale string, or schema.ts. Then:
npm test
npm run devSmoke renders every App(). dev rebuilds and uploads a draft to the store I linked
with feeef use. The browser opens with ?preview=. I click through home, a product,
and checkout. The catalog is the real one, which is what I want: fake products hide the
bug where a grid assumes the wrong media shape.
Customers without that cookie still see the previous theme. I leave the draft with the
banner or /?preview=0. The long version of the cookie and the local-API trap is
Customers never see your draft.
One thing the scaffold will not do for me: feeef template add page updates the
manifest and does not touch schema.ts. If I forget the page entry, the folder exists
and the editor has never heard of it. schema.ts replaces the page list when it
includes pages. It does not fill in the ones I skipped.
Publish builds again
I used to think I had to npm run build and then upload the file I was looking at.
Publish builds itself. The document it uploads is whatever the compiler emits at that
moment, not a dist/data.json I hand-edited an hour ago.
It writes four things:
- component rows for
shared/,library/, and each unique custom that only lives on a page - the listing (
store_templates) - a release, with a version and a changelog
- the locale files
Page components get turned into references on the way up. I have shipped a shell whose
slot rendered empty because the row went up without slotsSchema. The shop cannot invent
a hole the component record does not declare.
Locales come out of the document and go into their own rows. The shop still has Arabic
and English. The strings are just not stuffed inside templateData.
The flag I refuse to skip
npm run publish -- --applyThe -- is npm, not us. Without it, npm eats --apply and the CLI never sees the flag.
Running npm run publish with no flag updates the listing and the release, then asks
whether to install. Enter means no. The live shop stays on the previous install.
--no-apply skips the question. --yes also skips the question, and it still does not
install. --yes means "don't ask me." It does not mean "put this in front of customers."
I want that default. I have published a changelog while the draft was still wrong.
If the question on your machine highlights yes, your global CLI is older than this note.
Update @feeef.dev/cli. Those builds treated Enter as install, and I do not want you to
learn that from a customer's screenshot.
# listing only
npm run publish -- --no-apply
# free, public, still not on the live shop
npm run publish -- --public --no-apply
# paid, and install it
feeef template publish --public --price 5000 --version 1.0.0 \
--changelog "First release" --applyOmit --version and the release bumps the patch on its own. Price is DZD. No flag means
the listing is private.
A public or paid release can stop in the security scan. The scan reads the function bodies. When it fails, that release does not exist. I fix the component it names. I do not delete the honeypot to make the file smaller.
What I check before I call it shipped
I open the shop in a private window. No preview cookie. That window has to show the new
theme, and only after --apply. If it shows the old one, I published a listing and
forgot the install.
Then I place one test order, on a store that is allowed to take one. The phone number is a real lead. I use a number I control.
The command table is Develop and publish. The first folder is Create a template.
Building Cobalt: from a blank template to a real Feeef storefront
My working notes on designing, debugging, testing, and publishing a Feeef template—with a real demo store, screenshots, and a live playground.
Customers never see your draft
feeef template dev writes a second document on the store. I lost an hour once because my laptop and the shop were talking to different APIs.