-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from trafilea/feat/bootstrap-global-module
feat(theme): add bootstrap global module
- Loading branch information
Showing
6 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
packages/nx-shopify/src/generators/theme/files/src/core/theme-context.ts.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export interface ThemeContext {} | ||
export interface ThemeContext { | ||
themeName: string; | ||
} |
1 change: 1 addition & 0 deletions
1
packages/nx-shopify/src/generators/theme/files/src/global/index.ts.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './theme-global-module'; |
15 changes: 15 additions & 0 deletions
15
packages/nx-shopify/src/generators/theme/files/src/global/theme-global-module.ts.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { | ||
ThemeModule, | ||
ThemeContext, | ||
ThemeOnReady, | ||
} from '<%= importPath %>/core'; | ||
|
||
export class ThemeGlobalModule extends ThemeModule implements ThemeOnReady { | ||
constructor(context: ThemeContext) { | ||
super(context); | ||
} | ||
|
||
onReady() { | ||
console.log('Theme Global Module: onReady() called'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...src/generators/theme/files/src/theme/snippets/theme-context/theme-context.liquid.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
themeName: '{{ theme.name }}', | ||
} |