Abstract build steps to externalize the build configuration#6842
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report
Test suite run success3864 tests passing in 1498 suites. Report generated by 🧪jest coverage report action from 2830f1b |
cf3d1cc to
fab204c
Compare
4dd73b7 to
4a80cd2
Compare
fab204c to
602145f
Compare
4a80cd2 to
510502e
Compare
602145f to
bfb2090
Compare
bfb2090 to
2fafa03
Compare
ef67839 to
e07113f
Compare
e07113f to
2830f1b
Compare
| interface BuildConfig { | ||
| mode: 'none' | 'ui' | 'theme' | 'function' | 'tax_calculation' | 'copy_files' | ||
| steps?: ReadonlyArray<BuildStep> | ||
| stopOnError?: boolean | ||
| } |
There was a problem hiding this comment.
Why keep mode and steps? the mode doesn't do anything anymore with this implementation right?
There was a problem hiding this comment.
mode is still used in two other places of this file, so i keep it here untill the other to usages get sorted out and replaced
| {id: 'bundle-ui', displayName: 'Bundle UI Extension', type: 'bundle_ui', config: {}}, | ||
| {id: 'copy-static-assets', displayName: 'Copy Static Assets', type: 'copy_static_assets', config: {}}, |
There was a problem hiding this comment.
Why do you need a copy-static-assets step here?
There was a problem hiding this comment.
is part of the original ui mode, it had two lines one for bundeling another for copying. I kept it splited into two steps as it is pretty clear that copy assets should soon be a standard copy files step
| | 'copy_files' | ||
| | 'build_theme' | ||
| | 'bundle_theme' | ||
| | 'bundle_ui' | ||
| | 'copy_static_assets' | ||
| | 'build_function' | ||
| | 'create_tax_stub' | ||
| | 'esbuild' | ||
| | 'validate' | ||
| | 'transform' | ||
| | 'custom' |
There was a problem hiding this comment.
for me copy_files, bundle_theme, copy_static_assets is basically the same no? just move files from one place to another
There was a problem hiding this comment.
yes, I want to have follow up PRs migrating those but the changes are already enough as to add also this here

[Feature] Add build_steps extension build mode for flexible build pipelines
WHY are these changes introduced?
This PR introduces a new
build_stepsbuild mode for extensions, providing a more flexible and configurable build pipeline system. This allows extension developers to define custom build steps with different strategies, rather than being limited to the existing predefined build modes.WHAT is this pull request doing?
build_stepsmode to the extension build configurationdirectory: Copy an entire directorypattern: Copy files matching glob patternsfiles: Copy a specific list of filesThe architecture follows a Command Pattern approach, where each step type has a dedicated executor, making it easy to add more step types in the future.
How to test your changes?
shopify app devand verify that the assets are correctly copied to the output directoryMeasuring impact
How do we know this change was effective? Please choose one:
Checklist