-
Notifications
You must be signed in to change notification settings - Fork 263
refactor: remove buildConfig from specifications in favor of clientSteps #7334
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,13 +12,19 @@ import {Writable} from 'stream' | |
| interface BundleOptions { | ||
| app: AppInterface | ||
| appManifest: AppManifest | ||
| bundlePath?: string | ||
| bundlePath: string | ||
| identifiers?: Identifiers | ||
| skipBuild: boolean | ||
| isDevDashboardApp: boolean | ||
| } | ||
|
|
||
| export async function bundleAndBuildExtensions(options: BundleOptions) { | ||
| /** | ||
| * Builds all extensions into a bundle directory and compresses it when at | ||
| * least one extension declares deploy steps. Returns the bundlePath in that | ||
| * case, or undefined when no extension has deploy steps and there's nothing | ||
| * to upload beyond the manifest. | ||
| */ | ||
| export async function bundleAndBuildExtensions(options: BundleOptions): Promise<string | undefined> { | ||
|
Comment on lines
+21
to
+27
|
||
| const bundleDirectory = joinPath(options.app.directory, '.shopify', 'deploy-bundle') | ||
| await rmdir(bundleDirectory, {force: true}) | ||
| await mkdir(bundleDirectory) | ||
|
|
@@ -73,7 +79,12 @@ export async function bundleAndBuildExtensions(options: BundleOptions) { | |
| showTimestamps: false, | ||
| }) | ||
|
|
||
| if (options.bundlePath) { | ||
| const hasExtensionOutput = options.app.allExtensions.some((ext) => ext.hasDeploySteps) | ||
|
|
||
| if (hasExtensionOutput) { | ||
| await compressBundle(bundleDirectory, options.bundlePath) | ||
| return options.bundlePath | ||
| } | ||
|
|
||
| return undefined | ||
|
isaacroldan marked this conversation as resolved.
|
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.