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

Is it possible to change '@' prefix in handle? #237

Open
mciastek opened this issue Apr 24, 2017 · 4 comments
Open

Is it possible to change '@' prefix in handle? #237

mciastek opened this issue Apr 24, 2017 · 4 comments
Labels

Comments

@mciastek
Copy link

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

@dkhuntrods
Copy link
Member

@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!

@dkhuntrods dkhuntrods added the bug label Jul 21, 2017
@AstiV
Copy link

AstiV commented Sep 13, 2019

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.

@AndrewLeedham
Copy link
Contributor

Seems to me that this is also hard-coded into fractal core. E.g:

if (args.length == 1 && _.isString(args[0]) && !args[0].startsWith('@') && args[0].indexOf('.') !== -1) {

Also seems like development on v2 has halted. @dkhuntrods the slack group invitation seems to be closed as referenced in #449 (comment). What is the current project status for fractal?

@AstiV
Copy link

AstiV commented Dec 11, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants