IjzerenHein / famous-autolayout

Apple's Auto Layout and Visual Format language for famo.us
MIT License
55 stars 2 forks source link

Can't load vflToLayoutv3.js using requirejs #1

Open svdoever opened 8 years ago

svdoever commented 8 years ago

Hi IjzerenHein,

I'm trying to load vflToLayoutv3.js using requirejs, but can't load it because its not in the correct module format. Missing the wrapping:

define(function(require, exports, module) {
    :
}

Should I load the module in another way?

In your example code (in the documentation) for famous 0.3.5 you use LayoutController instead of AutoLayoutController. Is this correct?

AutoLayoutController.js is missing the same module wrapping...

Gr. Serge

IjzerenHein commented 8 years ago

Hi Serge,

I strongly recommend using a bundler like webpack or browserify to create your famo.us applications. This really speeds up load performance, especially on mobile. Are you familiar with these bundlers? They don't require the AMD wrapper. If you really have a good use case for using require-js, I could add the AMD wrapping, but I reckoned no-one was using that anymore in the famo.us community, so I didn't bother.

cheers, Hein