Skip to content

Commit

Permalink
Merge pull request #3842 from /issues/1962
Browse files Browse the repository at this point in the history
[Feature] Introduce `.json` asset support in theme app extensions
  • Loading branch information
karreiro committed May 6, 2024
2 parents 3466afd + 0ff96c7 commit 34f7e79
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/curvy-deers-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/cli-kit': minor
'@shopify/app': minor
---

Introduce `.json` support for theme app extensions
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const BUNDLE_SIZE_LIMIT = BUNDLE_SIZE_LIMIT_MB * megabytes
const LIQUID_SIZE_LIMIT_KB = 500
const LIQUID_SIZE_LIMIT = LIQUID_SIZE_LIMIT_KB * kilobytes

const SUPPORTED_ASSET_EXTS = ['.jpg', '.jpeg', '.js', '.css', '.png', '.svg']
const SUPPORTED_ASSET_EXTS = ['.jpg', '.jpeg', '.json', '.js', '.css', '.png', '.svg']
const SUPPORTED_LOCALE_EXTS = ['.json']
const SUPPORTED_EXTS: {[dirname: string]: FilenameValidation} = {
assets: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ThemeAppExtension < Default
SUPPORTED_BUCKETS = %w(assets blocks snippets locales)
BUNDLE_SIZE_LIMIT = 10 * 1024 * 1024 # 10MB
LIQUID_SIZE_LIMIT = 100 * 1024 # 100kb
SUPPORTED_ASSET_EXTS = %w(.jpg .jpeg .js .css .png .svg)
SUPPORTED_ASSET_EXTS = %w(.jpg .jpeg .js .json .css .png .svg)
SUPPORTED_LOCALE_EXTS = %w(.json)

def create(directory_name, context, getting_started: false)
Expand Down

0 comments on commit 34f7e79

Please sign in to comment.