Skip to content

bennadel/turbo-cfml

 
 

Repository files navigation

Turbo CFML

This is a fork of the Hotwire Turbo project. My only goal here is to make Turbo a bit more CFML compatible by including cfc, cfm, and cfml in the list of file extensions that Turbo considers to be likely to serve HTML content.

For reasons that I don't understand, the Turbo maintainers seem extremely hesitant about putting this type of configuration into the hands of the developers (despite many people submitting PRs to this effect). As such, forking this project seemed like the path of least resistance.

I have left most of the original files here in tact; and, changed only what I needed to in order to add CFML support and to allow me to build and install this repository as a package.json dependency.

To use this version of Turbo, you can include it in your package.json dependencies:

{
  "devDependencies": {
    "turbo-cfml": "github:bennadel/turbo-cfml#cfml-8.0.4-2"
  }
}

... where #cfml-8.0.4-2 indicates the branch / tag to be installed. Then, within your JavaScript, you can import Turbo from turbo-cfml:

import * as Turbo from "turbo-cfml";

document.documentElement.addEventListener(
	"turbo:visit",
	( event ) => {
		console.log( event );
	}
);

See the differences between my code and the main code.


Turbo (Original Readme)

Turbo uses complementary techniques to dramatically reduce the amount of custom JavaScript that most web applications will need to write:

  • Turbo Drive accelerates links and form submissions by negating the need for full page reloads.
  • Turbo Frames decompose pages into independent contexts, which scope navigation and can be lazily loaded.
  • Turbo Streams deliver page changes over WebSocket or in response to form submissions using just HTML and a set of CRUD-like actions.
  • Turbo Native lets your majestic monolith form the center of your native iOS and Android apps, with seamless transitions between web and native sections.

It's all done by sending HTML over the wire. And for those instances when that's not enough, you can reach for the other side of Hotwire, and finish the job with Stimulus.

Read more on turbo.hotwired.dev.

Contributing

Please read CONTRIBUTING.md.

© 2024 37signals LLC.

About

Fork of Hotwire Turbo that includes `cfm` in file extension matching.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.5%
  • Dockerfile 0.5%