Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Document the process of building assets for addons

Aperta
#1,421 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github-actions, laravel, php, vite
Ambito
documentation

Direzione di ricerca

Start by locating the addon development documentation and checking how it currently explains frontend assets and release workflows. Document the two approaches in the issue: committing built assets and publishing them, or building assets in GitHub Actions and distributing them with a Composer update. The work is done when addon developers can follow the documentation to choose and use either approach.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

This question has just come up on Discord:

Does anyone have any tips on how to distribute assets for an addon? I am developing an addon that needs some js and css on the frontend to work, I created frontend assets using vite but when used with the vite tag they only work for npm run build not dev

My response was:

You can either:

  1. Build them manually before you tag a release and include them in the Git repository. Then, in your service provider, you can publish the files to the site's public/vendor directory.
  2. A little more advanced way (which we do at Statamic, and I use for my addons), is to ignore committing assets to the repository, then building them as part of a GitHub Actions workflow used for releasing. Jason's built a package which'll then copy over the assets from the GitHub release into the site's vendor directory upon composer update.

It feels like we could do with some more detailed documentation around how addon developers should handle this.

Lingua principale
PHP
Stelle
133
Fork
405
Merge medio
21h 45m
PR unite (30g)
12

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di statamic/docs

Tutte le issue di statamic/docs

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.