Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for different file types than t3s #2

Open
schliesser opened this issue Apr 1, 2020 · 0 comments · May be fixed by #3
Open

Add support for different file types than t3s #2

schliesser opened this issue Apr 1, 2020 · 0 comments · May be fixed by #3

Comments

@schliesser
Copy link

There are two configuration options where I can choose a file type for the preview templates:

  1. In fractal.js I can set: fractal.components.set('ext', '.hbs');
  2. In my PHP Component I can override the $extension variable from AbstractComponent.php.

But this breaks the fractal preview as the preview file type is hardcoded to .t3s:

writeFile(path.join(componentParent, `_${componentName}-preview.t3s`), component.preview);

I would recommend to use the component extension variable in this line:

writeFile(path.join(componentParent, `_${componentName}-preview.${component.extension}`), component.preview);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant