Question

AFAIK, no sites like jsfiddle or codepen currently support Famo.us. Are there other methods for sharing working code examples of Famo.us that are permanent enough to warrant using on Stack Overflow?

Was it helpful?

Solution 4

** EDIT **

Check out jonperls answer. He has compiled a working version of famo.us for use in JSFiddle. Simply use the External Links feature of JSFiddle to link to the compiled source.

** ORIGINAL **

I have not heard of any way to share snippets in line with working examples.. But you could always just host the code here.. then link to the working example.

The quickest and easiest way I found to share Famo.us demos has been to host the examples on amazon's S3 as a static webpage.

It is super easy to create a bucket and enable it to act as a static hosted site.

Worrying about DNS is optional. When you enable a bucket as a static host you get an endpoint. eg.

http://higherorderhuman.com.s3-website-us-east-1.amazonaws.com

It is up to you if you want to deal with setting up DNS and making that point to a more attractive URL. For me, both..

http://higherorderhuman.com.s3-website-us-east-1.amazonaws.com/examples/lens.html

and

http://higherorderhuman.com/examples/lens.html

Go to the same place.

By using folders on s3 and creating separate html files, I am able to host all examples from this single endpoind. eg. another example at..

http://higherorderhuman.com/examples/scrollbars.html

Just make sure all files that get uploaded are made public with.. 'Make Public'

Still looking forward for JSFiddle support.. But at least this does it for me for now!

OTHER TIPS

Starting on May 16th, Famo.us will begin testing a minified CDN version of famous.js that can be used in much the same way as one would use the minified CDN for JQuery and JQuery plugins. Once the CDN is in place, developers can fiddle with famo.us core, famo.us discrete examples, famo.us widgets and famo.us templates within famo.us university, jsfiddle and codepen.

In addition, we will also be testing a new BUILD MIN service to super minify your code. Send a .zip file to the BUILD MIN service of famo.us and get back a custom min'd and CDN'd famous.js that only uses the components needed for our app.

hope this helps.

I compiled famo.us so that it can be used in a jsfiddle.

Here is the jsfiddle http://jsfiddle.net/jperl/7wEWU.

Here is the compiled repo https://github.com/jperl/famous-compiled.

http://jsfiddle.net/7beq5/2

<html>
  <script src='http://code.famo.us/lib/require.js'></script>
  <script src='http://code.famo.us/famous/0.2/famous.min.js'></script>

  <script> // (this could be another file)
    require(['famous/core/Engine',
      'famous/core/Surface',
      'famous/core/Modifier'
    ], function(Engine, Surface, Modifier){

        // --------------- use famo.us here ------------------ //

    });
  </script>
<html>

The codefamo.us site launched today (May 19). It displays famo.us code stored as a GitHub Gist if saved with the name main.js.

To view the working example of the code, simply tack the gist identifier onto the end of the "gist.codefamo.us" uri:

For example:

http://gist.codefamo.us/74ca030bafdca1635e47

The code displays in a collapsible panel and runs in a preview panel. You can make changes to the code and see them reflected in the preview, similar to Famo.us University.

Disclosure: I'm one of the two people behind this site.

Use http://famousco.de/ and then post the link here!

p.s. i am the webmaster of famousco.de :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top