Skip to content

Commit

Permalink
fix(demo): subdir now explicitely loads from self
Browse files Browse the repository at this point in the history
Only components were used before, so its directory name was hardcoded.
But "components" is also an unconfigurable name used by Fractal.
So both core-styles and Fractal share the "components" directory.
To resolve this, "_preview" now expects subdir parameter and gets it.
  • Loading branch information
wesleyboar committed Aug 22, 2022
1 parent ed173fd commit 7f45eb0
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/_imports/_preview.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{#unless styles.shouldSkipBase}}
<link
rel='stylesheet'
href='{{path "/components/{{ _target.baseHandle }}.css"}}'
href='{{path "/{{ subdir }}/{{ _target.baseHandle }}.css"}}'
/>
{{/unless}}

Expand Down
1 change: 1 addition & 0 deletions src/lib/_imports/components/_components.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
preview: "@components.preview"
1 change: 1 addition & 0 deletions src/lib/_imports/components/_components.preview.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> @preview subdir="components" }}
1 change: 1 addition & 0 deletions src/lib/_imports/elements/_elements.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
preview: "@elements.preview"
1 change: 1 addition & 0 deletions src/lib/_imports/elements/_elements.preview.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> @preview subdir="elements" }}
1 change: 1 addition & 0 deletions src/lib/_imports/generics/_generics.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
preview: "@generics.preview"
1 change: 1 addition & 0 deletions src/lib/_imports/generics/_generics.preview.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> @preview subdir="generics" }}
1 change: 1 addition & 0 deletions src/lib/_imports/objects/_objects.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
preview: "@objects.preview"
1 change: 1 addition & 0 deletions src/lib/_imports/objects/_objects.preview.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> @preview subdir="objects" }}
1 change: 1 addition & 0 deletions src/lib/_imports/trumps/_trumps.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
preview: "@trumps.preview"
1 change: 1 addition & 0 deletions src/lib/_imports/trumps/_trumps.preview.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{> @preview subdir="trumps" }}

0 comments on commit 7f45eb0

Please sign in to comment.