Build: Rebuild package stylesheet entrypoints for file updates#15920
Merged
Conversation
aduth
commented
May 30, 2019
| return new Transform( { | ||
| objectMode: true, | ||
| async transform( file, encoding, callback ) { | ||
| // Only stylesheets are subject to this transform. |
Member
Author
There was a problem hiding this comment.
I thought to be clever / functional here with some sort of conditional flow (an overEvery and/or series Promise) but I couldn't come up with an implementation which wouldn't end up being unnecessarily obscure / unreadable.
noisysocks
approved these changes
May 31, 2019
Member
|
I better merge it to ensure |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regression introduced in #15230
This pull request seeks to resolve an issue with the revised build implementation merged in #15230 . Stylesheet rebuilds are always intended to compile from the entrypoints, not from the individual files which have been updated. This is distinct from JavaScript files, which are built individually and which rely on Webpack to manage entrypoint bundling.
Implementation Notes:
Since this was already stream-based, I implemented the fix using a stream transform to map the files modified to the equivalent entrypoints.
Testing Instructions:
Run the command:
Verify at
./packages/block-library:buildincludescolumns/edit.jsandcolumns/edit.js.mapbuild-styleincludeseditor.css,style.css,theme.css(and RTL counterparts)The fix is specifically in the latter point. Previously, the build script would output the compiled CSS at
build-style/columns/editor.cssandbuild-style/columns/style.css. The former point is merely to assure there is no effect on JavaScript build.