-
Notifications
You must be signed in to change notification settings - Fork 49
Include JS build files in the Composer package in v0.2.0 release #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/0.2 #100 +/- ##
==============================================
Coverage 85.69% 85.69%
Complexity 103 103
==============================================
Files 16 16
Lines 776 776
Branches 86 85 -1
==============================================
Hits 665 665
Misses 111 111
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
For comparison, I include 54d9765 that has
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
959e352 to
54d9765
Compare
build-types package.json files Should you mirror Gutenberg's structure with build/client/? |
emdashcodes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The types would be useful for anyone pulling this in to a TS project. It is not strictly required though.
They would need to configure their tsconfig at the moment to include something like
"@wordpress/abilities": [
"./vendor/wordpress/abilities-api/packages/client/build-types"
]
This would only be considered temporary until we publish the npm package which will include the types.
I don't have a strong preference for where things are stored. I need to look a little closer at how all the Gutenberg packages are stored.
I was contemplating how that could be done. Happy to remove the commit that excludes |
54d9765 to
bcb1c7e
Compare

This PR improves the configuration for Composer package by ensuring only files from
packages/client/buildandpackages/client/build-typesget included.Now, the question is whether we really need
build-typesifbuildfolder contains code ready for use on production exposed throughwp.abilitiesglobal.@emdashcodes or @budzanowski, what would be the purpose of including
build-typeshere? Should we includepackage.json, too?On the higher level, It feels to me like we should keep the build files in the top-level folder mirroring Gutenberg like:
build/client/In Gutenberg, we store different types of content inside local build folder:
buildis Common JS version of the package (import/exportreplaced withrequire/module.exports)build-moduleis more like ES Modules version of the codeThese are modified sources that are compiled with Babel with small changes that ensure these files can run in all browsers.
Testing instructions
Run
git archive --format=zip HEAD -o archive.zipto check the contents of the Composer package: