Skip to content

[6.x] Update make:fieldtype stubs#12533

Merged
jasonvarga merged 25 commits intomasterfrom
fieldtype-stubs
Sep 23, 2025
Merged

[6.x] Update make:fieldtype stubs#12533
jasonvarga merged 25 commits intomasterfrom
fieldtype-stubs

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

@duncanmcclean duncanmcclean commented Sep 22, 2025

This pull request updates the stubs used by the php please make:fieldtype command, updating it for Statamic 6 & Vue 3.

This PR also includes some small, related changes:

  • When running make:fieldtype, if the application isn't setup for CP JavaScript, it'll suggest running the setup-cp-vite command.
  • When running make:fieldtype to generate an addon fieldtype, it'll now run npm install after copying over the package.json and vite.config.js stubs, so npm run build works right away.
  • Converted the Vue component stub to the Composition API and updated the example (I've updated the docs to go alongside this).
  • The setup-cp-vite command previously had its own ExampleFieldtype.vue stub. It now uses the same stub as make:fieldtype.
  • Updated the version of Vite used in the addon package.json stub so its compatible with @vitejs/plugin-vue.
  • Updated tests for the make:fieldtype command
  • Added tests for the setup-cp-vite command

@duncanmcclean
Copy link
Copy Markdown
Member Author

Marking this as a draft until I get the tests figured out.

@duncanmcclean duncanmcclean marked this pull request as draft September 23, 2025 08:40
@duncanmcclean duncanmcclean marked this pull request as ready for review September 23, 2025 17:03
@jasonvarga jasonvarga merged commit 2fe4171 into master Sep 23, 2025
18 checks passed
@jasonvarga jasonvarga deleted the fieldtype-stubs branch September 23, 2025 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants