Pull Request: add markets & locales Support + update gitignore and fixtures#177
Pull Request: add markets & locales Support + update gitignore and fixtures#177gil93 wants to merge 4 commits into
Conversation
|
@jeffreyguenther this PR adds Markets & Locales support and resolves #142. |
|
First off, thanks for preparing this PR! I would prefer to split this PR into two. I'd like to add the markets and locales work in as separate units. They are separate concerns. In particular, handling locales is not as simple as storing them in buckets as noted in the ticket. Before adding locale support, we need to look at the current workflow for locales as a whole, especially since The markets work is a nobrainer, we can get that in and a release cut. |
|
Hey @jeffreyguenther, thanks for the feedback! Got it. I’ll split this into two PRs:
|
|
Superseded by split PRs:
Closing this pull request in favor of the split PRs. |
Summary
Adds Markets and Locales support to Shopkeeper buckets and updates ignore rules so required fixtures are tracked. Improves docs and tests accordingly.
What’s Changed
.gitignore
.shopkeeperglobally, but unignoresrc/utilities/fixtures/.shopkeeper/so repo fixtures are tracked.README / Docs
.shopkeeper/production/config/markets.jsonin the example tree.locales/usage and ignore patterns for theme projects, including schema exclusion.Bucket Scaffolding
createBucketsnow createslocales/in each bucket.Patterns & Flags
getSettingsPatterns()now returns:['config/settings_data.json', 'config/markets.json', 'templates/**/*.json', 'sections/*.json', 'locales/!(*schema*).json']CLI_SETTINGS_FLAGSincludes the same (so--onlyflags cover markets + locales while excluding schema JSON).getSettingsFolders()now includes'locales'.Tests
config/markets.jsonandlocales/*.json(excluding*schema*.json) in pull/flags.Fixtures
Add empty fixture files for:
src/utilities/fixtures/.shopkeeper/production/config/markets.jsonsrc/utilities/fixtures/.shopkeeper/production/locales/en.default.jsonsrc/utilities/fixtures/theme/config/markets.jsonsrc/utilities/fixtures/theme/locales/en.default.jsonWhy
.shopkeeperfixtures tracked for tests/docs, while still ignoring other.shopkeeperpaths.Behavior / Compatibility
locales/folder and recognizesconfig/markets.jsonif present).locales/!(*schema*).jsonavoids bringing schema files into pulls/commits.Testing
Ran unit tests (
vitest --run).Manual “human testing” via local
file:install of the package and verified:--onlyflags include markets + locales (without schema files).Fixes #142#142 will be addressed in a future effort / pull request.