Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run the examples? #7

Open
ryskajakub opened this issue Dec 10, 2014 · 2 comments
Open

How to run the examples? #7

ryskajakub opened this issue Dec 10, 2014 · 2 comments

Comments

@ryskajakub
Copy link

After installing with haste-inst install,
I run: hastec --with-js=lib/stubs.js example/simple/simple.hs --out=example/simple/main.js from the root of the project
And then open the file in chrome.
And when I type in the input box, the texts doesn't change.

Does it depend on some fixed version of ghc? I use 7.6.3

@maks83
Copy link

maks83 commented Jan 19, 2015

I use 7.8.3
hastec --with-js=lib/stubs.js example/src/Main.hs --out=example/src/Main.js
When create example/src/Main.html

<!DOCTYPE html>
<html>
    <head>
        <meta charset='utf-8'>
        <title>test</title>
        <link rel="stylesheet" href="todomvc/base.css">
        <script src="http://fb.me/react-with-addons-0.12.0.js"></script>
        <script src="Main.js"></script>
    </head>
    <body>
        <div id="simple-demo"></div>
        <div id="circles-demo"></div>
        <div id="chain-demo"></div>
    <div id="easing-demo"></div>
    <div id="slide-demo"></div>
    </body>
</html>

And all works fine!

@johncant
Copy link

I'm using:
GHC 7.8.4
haste 0.5.0 (master from a few weeks ago)
and out of those 5 examples, I could only get 3 to work. I had to use --ddisable-js-opts, otherwise only chain-demo worked.

Use HTML from @maks83 , comment out the easing and slide examples in examples/src/Main.hs, then compile with (from the top-level dir):

haste-inst install
hastec --with-js=lib/stubs.js example/src/Main.hs example/src/Circles.hs example/src/Easing.hs example/src/Simple.hs example/src/Slide.hs example/src/Chain.hs --out=example/src/Main.js --debug --ddisable-js-opts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants