Using a JavaScript Framework with Flare

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
headphone_jack
Propeller Head
Posts: 16
Joined: Fri Dec 22, 2017 1:49 am

Using a JavaScript Framework with Flare

Post by headphone_jack »

Is it possible to use a JavaScript framework within Flare? Specifically React, Angular, or VueJS. I am not looking at using jQuery.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Using a JavaScript Framework with Flare

Post by NorthEast »

headphone_jack wrote:Is it possible to use a JavaScript framework within Flare? Specifically React, Angular, or VueJS. I am not looking at using jQuery.
Flare HTML5 output uses jQuery, parts of Foundation, and some custom MadCap scripts.

So I guess the question is whether they would conflict with the frameworks that you mention?
headphone_jack
Propeller Head
Posts: 16
Joined: Fri Dec 22, 2017 1:49 am

Re: Using a JavaScript Framework with Flare

Post by headphone_jack »

Dave Lee wrote:So I guess the question is whether they would conflict with the frameworks that you mention?
Thanks for your quick reply Dave.

Looking at the markup, there's a whopping 11 JS files that Flare kicks out. :shock: :shock: :shock: After a bit of playing around, I've found that require.min.js and require.config.js are causing VueJS not to run.

So I think I've answered my own question. Technically yes Flare might work with a JS framework, but it'd require a massive amount of hacking around and post-build tasks.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Using a JavaScript Framework with Flare

Post by NorthEast »

A long long time ago, I used the datatables plugin, and had to load that via RequireJS.
I got it working, although I can't say I ever got to grips with RequireJS.
Anyway, this post might give you some pointers (on loading a library via the require config):
viewtopic.php?f=9&t=19291#p101300
headphone_jack
Propeller Head
Posts: 16
Joined: Fri Dec 22, 2017 1:49 am

Re: Using a JavaScript Framework with Flare

Post by headphone_jack »

I'm going to see if I can find a way to remove Require.js completely, or at least have it load after Vue. Thanks for your help Dave.
AlexFox
Sr. Propeller Head
Posts: 149
Joined: Thu Oct 19, 2017 1:56 am

Re: Using a JavaScript Framework with Flare

Post by AlexFox »

I believe Require is bundled with Flare as most things conflict with Flare's foundational JS if not consumed by Require instead. But good luck!
alihassan
Jr. Propeller Head
Posts: 1
Joined: Mon Jun 18, 2018 9:00 am

Re: Using a JavaScript Framework with Flare

Post by alihassan »

@headphone_jack or anybody

Is there any way to integrate the HTML, CSS, JS output of flare into an Angular SPA?
headphone_jack
Propeller Head
Posts: 16
Joined: Fri Dec 22, 2017 1:49 am

Re: Using a JavaScript Framework with Flare

Post by headphone_jack »

alihassan wrote:@headphone_jack or anybody

Is there any way to integrate the HTML, CSS, JS output of flare into an Angular SPA?
Sorry for the late reply Alihassan. I'm not aware of any way to integrate Angular into Flare unfortunately. Flare's web side is incredibly outdated, and struggles to keep up with the industry.
Craig.Prichard
Propeller Head
Posts: 62
Joined: Sat Dec 10, 2005 8:06 pm
Location: Calgary, AB Canada

Re: Using a JavaScript Framework with Flare

Post by Craig.Prichard »

Is it still true Flare doesn't play well with Angular.js?
Post Reply