Replies: 1 comment
-
Hi Kristin—Thanks for posting this! I haven't used Pantheon with WordPress before, but I've spent some time in the Pantheon–Drupal world. I haven't had time to test this, but my proposed approach would be as follows, pretending your theme slug is
For clarity, this is the proposed directory structure:
My one piece of feedback on what you wrote is that there would be no harm in running The approach above would remove the automated versioning that comes with You could potentially add a script that does something like You could also have a policy of committing unminified assets to the dev environment, with a script that does Happy to brainstorm this further, but that's it from me off the top of my head! |
Beta Was this translation helpful? Give feedback.
-
Hello!
Just giving _tw a spin, have gone through the documentation and have some questions with regards to "other deployment options" and how I can integrate development of a _tw-based theme into our current workflow.
We're not developing themes for general/published release; they're custom, one-off, maintained themes, per client.
Sites are hosted on the Pantheon platform. Pantheon provides dev/staging/production environments; staging and production are read-only environments (excluding the "uploads" folder). Moving code to these environments requires pushing code from DEV to TEST, then TEST to PRODUCTION via GIT.
The development environment can be set to SFTP or GIT (one of the other); we use GIT for the dev environment as well, and when using GIT, the development environment is also read-only (again, excluding "uploads"). So, all development (mainly theme-related) and maintenance (mainly plugin updates) is done via local dev environments, pulling/pushing from the master (Pantheon dev environment).
So I'm curious as to the best approach for integrating a _tw theme into this workflow, with the following in mind:
To make this work, I'm thinking...
I'd still ignore /node_modules and /vendor (and the .zip that could be generated if someone ran
npm run bundle
).Developers coming into an in-development project would clone from the master, and then run both
npm install
andcomposer install
, but shouldn't runnpm run dev
, as the theme's stylesheet would already exist (and would be included in the repo clone).We'd also need to ensure that
npm run prod
was always run (with results committed to GIT) prior to any push back to the remote master/repo.Hoping someone might be able point out anything I'm missing/doing wrong with the above, suggest something, etc. Just hoping to come up with a solution that will work for us so we can move forward with _tw.
Thanks,
Kristin.
Beta Was this translation helpful? Give feedback.
All reactions