@dosgato/templating 0.0.97 → 0.0.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,14 +82,14 @@ export declare abstract class Component<DataType extends ComponentData = any, Fe
82
82
  * going to render anything. For instance, if we are rendering an '.ics' variation and this component
83
83
  * is not an event, it will not be participating and we'd like to avoid doing the work in the fetch().
84
84
  *
85
- * This method returns an array of extensions where we SHOULD run fetch(). The default is only run fetch
85
+ * This method returns true for extensions where we SHOULD run fetch(). The default is only run fetch
86
86
  * on 'html'. Components that support other variations should override this method and opt in to more
87
87
  * extensions.
88
88
  *
89
- * The extensions listed should NOT include the preceding dot. In the case of an extended extension like
90
- * '.js.map', you should provide 'js.map'.
89
+ * The extension will NOT include the preceding dot. In the case of an extended extension like
90
+ * '.js.map', you should receive 'js.map'.
91
91
  */
92
- variationsToFetch(): string[];
92
+ shouldFetchVariation(extension: string): boolean;
93
93
  /**
94
94
  * Some components may be inheritable to subpages within the same site. For instance, a site's
95
95
  * social media links may appear on every page's footer. To accomplish this in your template,
package/dist/component.js CHANGED
@@ -70,14 +70,14 @@ export class Component extends ResourceProvider {
70
70
  * going to render anything. For instance, if we are rendering an '.ics' variation and this component
71
71
  * is not an event, it will not be participating and we'd like to avoid doing the work in the fetch().
72
72
  *
73
- * This method returns an array of extensions where we SHOULD run fetch(). The default is only run fetch
73
+ * This method returns true for extensions where we SHOULD run fetch(). The default is only run fetch
74
74
  * on 'html'. Components that support other variations should override this method and opt in to more
75
75
  * extensions.
76
76
  *
77
- * The extensions listed should NOT include the preceding dot. In the case of an extended extension like
78
- * '.js.map', you should provide 'js.map'.
77
+ * The extension will NOT include the preceding dot. In the case of an extended extension like
78
+ * '.js.map', you should receive 'js.map'.
79
79
  */
80
- variationsToFetch() { return ['html']; }
80
+ shouldFetchVariation(extension) { return extension === 'html'; }
81
81
  /**
82
82
  * Inherit components from another page with matching area
83
83
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.97",
3
+ "version": "0.0.99",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {