This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Zachary Russell Heineman
Posted Feb 27 - Read on Facebook

Is there a best-practice way to break up a Framer Studio project into multiple files to keep code organized (and each file a manageable length)?


Zachary Russell Heineman

How about any good way? (That has worked well in practice.)

Johnny Chen

I've also struggled with this problem as I find that I'm already at 1500 lines of code. My solution is brittle but it works for me right now.

Basically, I edited "../framer/init.js" and the "#loadProject()" method to also load my other *.coffee files.

Looks like this,

I'd be happy to hear about other ways to do this.

* Customized to load the "" source and concatenate w/
function loadProject() {

xhr0 = new window.XMLHttpRequest()"GET","", false)
var libSrc = xhr0.responseText

xhr1 = new window.XMLHttpRequest()"GET","", false)
var partySrc = xhr1.responseText

xhr = new window.XMLHttpRequest()"GET", "", true)

xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.responseText != "") {
+ "\n\n"
+ partySrc
+ "\n\n"
+ xhr.responseText)



Read the entire post on Facebook