Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ theme/templates/**/*.json
theme/sections/*.json

.shopkeeper
!src/utilities/fixtures/.shopkeeper/
shopify
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ installation of [Dawn](https://github.com/shopify/dawn):
.shopkeeper
├── production
│   ├── config
│   │   └── settings_data.json
│   │   ├── settings_data.json
│   │   └── markets.json
│   ├── sections
│   │   ├── footer-group.json
│   │   └── header-group.json
Expand Down
1 change: 1 addition & 0 deletions docs/the_complete_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ We add the following lines to our project's `.gitignore`:
##########
theme/assets
theme/config/settings_data.json
theme/config/markets.json
theme/templates/**/*.json
theme/sections/*.json
```
Expand Down
1 change: 1 addition & 0 deletions src/services/bucket/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const DEFAULT_GITIGNORE_FILE = `# Shopkeeper #
##########
theme/assets
theme/config/settings_data.json
theme/config/markets.json
theme/templates/**/*.json
theme/sections/*.json
`
7 changes: 6 additions & 1 deletion src/utilities/bucket.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ describe('bucket utilities', () => {
expect(actualSettingsFilePaths.sort()).toEqual(
[
'config/settings_data.json',
'config/markets.json',
'templates/product.json',
'templates/customers/account.json',
'templates/metaobject/toy.json',
Expand All @@ -144,6 +145,7 @@ describe('bucket utilities', () => {
expect(actualSettingsFilePaths.sort()).toEqual(
[
'config/settings_data.json',
'config/markets.json',
'templates/product.json',
'templates/customers/account.json',
'templates/metaobject/toy.json',
Expand All @@ -165,6 +167,7 @@ describe('bucket utilities', () => {
expect(actualSettingsFilePaths.sort()).toEqual(
[
'config/settings_data.json',
'config/markets.json',
'templates/product.json',
'templates/customers/account.json',
'templates/metaobject/toy.json',
Expand Down Expand Up @@ -235,7 +238,7 @@ describe('bucket utilities', () => {
const settingsFolders = getSettingsPatterns()

// Then
expect(settingsFolders).toEqual(['config/settings_data.json', 'templates/**/*.json', 'sections/*.json'])
expect(settingsFolders).toEqual(['config/settings_data.json', 'config/markets.json', 'templates/**/*.json', 'sections/*.json'])
})
})

Expand All @@ -250,6 +253,8 @@ describe('bucket utilities', () => {
'--only',
'config/settings_data.json',
'--only',
'config/markets.json',
'--only',
'sections/*.json',
'--only',
'templates/*.json',
Expand Down
8 changes: 7 additions & 1 deletion src/utilities/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,17 @@ export async function getCurrentBucket(shopkeeperRoot: string): Promise<string>
}

export function getSettingsPatterns(): string[] {
return ['config/settings_data.json', 'templates/**/*.json', 'sections/*.json']
return [
'config/settings_data.json',
'config/markets.json',
'templates/**/*.json',
'sections/*.json',
]
}

export const CLI_SETTINGS_FLAGS = [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down
Empty file.
Empty file.
11 changes: 11 additions & 0 deletions src/utilities/theme.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe('theme utilities', () => {
// Given
const settingsFlags = [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down Expand Up @@ -46,6 +47,7 @@ describe('theme utilities', () => {
// Given
const settingsFlags = [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down Expand Up @@ -101,6 +103,7 @@ describe('theme utilities', () => {
nodelete: true,
only: [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down Expand Up @@ -139,6 +142,7 @@ describe('theme utilities', () => {
nodelete: false,
only: [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down Expand Up @@ -177,6 +181,7 @@ describe('theme utilities', () => {
nodelete: true,
only: [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down Expand Up @@ -215,6 +220,7 @@ describe('theme utilities', () => {
nodelete: true,
only: [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down Expand Up @@ -253,6 +259,7 @@ describe('theme utilities', () => {
nodelete: false,
only: [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down Expand Up @@ -358,6 +365,7 @@ describe('theme utilities', () => {
nodelete: false,
only: [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down Expand Up @@ -396,6 +404,7 @@ describe('theme utilities', () => {
nodelete: false,
only: [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down Expand Up @@ -430,6 +439,7 @@ describe('theme utilities', () => {
nodelete: undefined,
only: [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand All @@ -447,6 +457,7 @@ describe('theme utilities', () => {
expect(pull).toHaveBeenCalledWith(expect.objectContaining({
only: [
'config/settings_data.json',
'config/markets.json',
'sections/*.json',
'templates/*.json',
'templates/customers/*.json',
Expand Down