diff --git a/README.md b/README.md index ac2531c..443f95e 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -# Sortable Tables \ No newline at end of file +# Sortable Tables + + +## Examples + + 1. [U.S. Presidents by Birth Place](http://evancz.github.io/elm-sortable-tables/presidents.html) + 2. [Travel Planner for the Mission District in San Francisco](http://evancz.github.io/elm-sortable-tables/travel.html) diff --git a/examples/2-sightseeing.elm b/examples/2-travel.elm similarity index 100% rename from examples/2-sightseeing.elm rename to examples/2-travel.elm diff --git a/examples/README.md b/examples/README.md index 604b87b..e9fe9af 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,8 +1,12 @@ # Examples + 1. [U.S. Presidents by Birth Place](http://evancz.github.io/elm-sortable-tables/presidents.html) + 2. [Travel Planner for the Mission District in San Francisco](http://evancz.github.io/elm-sortable-tables/travel.html) + + ## Build Instructions -To see the examples running without any CSS you can just run the following commands: +To see the examples *without* CSS, run the following commands: ```bash git clone https://github.com/evancz/elm-sortable-table.git @@ -11,4 +15,25 @@ cd examples elm-reactor ``` -And then navigate to `1-presidents.elm` from [localhost:8000](http://localhost:8000/). +Then navigate to `1-presidents.elm` or `2-travel.elm` from [localhost:8000](http://localhost:8000/). When using `elm-reactor`, refreshing a page that ends with `.elm` will recompile the code in that file and show you the new result. + + +## Build Instructions with CSS + +To see the examples *with* CSS, run the following commands: + +```bash +git clone https://github.com/evancz/elm-sortable-table.git +cd elm-sortable-table +cd examples +elm-make 1-presidents.elm --yes --output=elm.js +elm-reactor +``` + +Then open [localhost:8000/index.html](http://localhost:8000/index.html) in your browser. That HTML file loads in some CSS and whatever code is in `elm.js`. So if you want to see the second example with CSS, you can compile it like this: + +```bash +elm-make 2-travel.elm --yes --output=elm.js +``` + +As you make changes, you will want to recompile the Elm code with `elm-make`. \ No newline at end of file diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 0000000..b9e5ec9 --- /dev/null +++ b/examples/index.html @@ -0,0 +1,15 @@ + + + + +
+ +