natefaubion / purescript-spork

Elm-like for PureScript
MIT License
157 stars 9 forks source link

How to run the todomvc example #25

Closed marick closed 6 years ago

marick commented 6 years ago

I ran the following:

npm install
bower install
npm run example:all
cd examples/todo-mvc/
open index.html

I get a blank screen and this in the console:

SecurityError (DOM Exception 18): The operation is insecure.

This was in Safari 11.0.1, OS X 10.11.6

Full exception below:

screen shot 2018-03-29 at 6 43 51 pm
natefaubion commented 6 years ago

I wonder if it needs to be served from a dev server.

natefaubion commented 6 years ago

Latest Safari has a a restriction that disables localStorage for local files. It either needs to be served through a local server, or you can temporarily disable the restriction in the dev menu.

natefaubion commented 6 years ago

A useful enhancement for examples would be to have an npm script for running a local server and also having an index file with descriptions.

marick commented 6 years ago

My pull request doesn't do anything with servers. I don't know what you mean by "index file with descriptions". If enlightened, I would provide them.

natefaubion commented 6 years ago

I just mean launching a static server (like https://www.npmjs.com/package/http-server maybe), with an examples/index.html file that has titles and descriptions of the examples with links.

marick commented 6 years ago

I'm not sure what that adds to the instructions I put in the pull request. Something like elm-reactor would be nice, but it seems out of scope...

natefaubion commented 6 years ago

I'm not suggesting you add it for your PR, just that it would be a convenient showcase and solve the devtool problem :)