Fractal: Is it possible to change '@' prefix in handle?

Created on 24 Apr 2017  路  4Comments  路  Source: frctl/fractal

Hi,

I'm using Fractal styleguide tool with Handlebars in my project. Provided handle concept conflicts with my current setup, so is it possible to remove '@' prefix from partial handle. I want to include partials without '@' symbol, e.g. {{> button}}.

I found that there is a method called setHandlePrefix in core/adapter.js, but it seems that Handlebars engine don't allow to customise handle's prefix. See: frctl/handlebars/adapter.js.

I use https://github.com/shannonmoeller/gulp-hb for building Handlebars templates and I want to use Fractal only as a styleguide tool.

Regards

bug

Most helpful comment

@AndrewLeedham thanks for your answer. I was able to rewrite the CLI script which is provided in the documentation to accomplish the task of getting rid of the @ (https://fractal.build/guide/integration/including-as-dependency.html#_3-next-steps)

the slack group invitation seems to be closed

it's not closed but I guess the invite links are outdated (#525). @Chapabu was so kind to add me by using my E-Mail address.

All 4 comments

@mciastek Yep, that should be possible. Unfortunately, with limited dev time we're focusing our efforts on v2, which means I can't say when we'll get a chance to look at this.
The good news is that this will definitely be working in v2!

Hey,

I have a similar issue. We're evaluating the usage of fractal in combination with mustache templating engine - and we would also like to reference partials the usual way, without the '@', e.g. {{> button}}, in order to be able to integrate components that were built in fractal, into our application.

Since this issue was raised more than two years ago, I was wondering if there is another option or a known workaround already, that I've possibly missed so far.

Thanks in advance and best wishes.

Seems to me that this is also hard-coded into fractal core. E.g: https://github.com/frctl/fractal/blob/9233625bbdf3a4fc0aaba2b58838cebfb095231e/src/api/components/source.js#L70

Also seems like development on v2 has halted. @dkhuntrods the slack group invitation seems to be closed as referenced in https://github.com/frctl/fractal/issues/449#issuecomment-404808480. What is the current project status for fractal?

@AndrewLeedham thanks for your answer. I was able to rewrite the CLI script which is provided in the documentation to accomplish the task of getting rid of the @ (https://fractal.build/guide/integration/including-as-dependency.html#_3-next-steps)

the slack group invitation seems to be closed

it's not closed but I guess the invite links are outdated (#525). @Chapabu was so kind to add me by using my E-Mail address.

Was this page helpful?
0 / 5 - 0 ratings