creativecommons / wp-plugin-creativecommons-website

This WordPress plugin provides custom functionality for the creativecommons.org website.
Other
2 stars 6 forks source link

Ensure project release works properly #22

Closed brylie closed 2 years ago

brylie commented 2 years ago

Continued from #19

Problem

We have recently made a project release so that we can install this plugin on downstream websites. The websites use Composer to manage dependencies, so this project includes a composer.json. However, our this plugin also needs a build step in order to prepare the Gutenberg plugins for distribution.

Ideally, we wouldn't need to include a dist folder in the project source code.

Task

shailee-m commented 2 years ago

@brylie Ideally this is taken care of in #24

brylie commented 2 years ago

@shailee-m it seems that #24 was closed by an update to package-lock.json. How does updating the package-lock.json resolve this issue and #24?

shailee-m commented 2 years ago

@brylie I have created 2 PRs the other one is in the main repo. https://github.com/creativecommons/project_creativecommons.org/pull/235

merging both these together should close the issue

brylie commented 2 years ago

@shailee-m, the idea of this issue is that we publish a stand-alone release that includes all necessary files and assets to be directly installed in a WordPress website without any additional build step.

The https://github.com/creativecommons/project_creativecommons.org/pull/235 pull request adds the build step in the downstream project. I'm hoping we can resolve the issue directly in this repository, e.g. by including the build output under revision control (which admittedly isn't ideal.)

brylie commented 2 years ago

I think we're just reversing the decision from October to exclude the build/ folder:

https://github.com/creativecommons/wp-plugin-creativecommons-website/commit/d49e7d406455825a2fa4e610f8d6fbd22de4d6cf

brylie commented 2 years ago

I'm not sure how to generate a ZIP file with all source code, and the corresponding JS build output for clarification. Making a GitHub Release will only include the source files but not a build step/output. GitHub Packages doesn't seem like the right tool for the job, nor does NPM. I've checked out how other Gutenberg block plugins distribute their code and it seems common to include the build output directly in the commit history (again, not ideal :-)

brylie commented 2 years ago

Closed by #26