Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

Commit

Permalink
Merge branch '0.17'
Browse files Browse the repository at this point in the history
  • Loading branch information
process-bot committed Apr 20, 2016
2 parents b895042 + a4549f8 commit ad09d01
Show file tree
Hide file tree
Showing 54 changed files with 3,268 additions and 2,339 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
dist
assets/_reactor/debug.js
assets/_reactor/index.js
elm-stuff
cabal.sandbox.config
cabal.sandbox.config
elm.js
.cabal-sandbox/
last-modified
Empty file added .gitmodules
Empty file.
98 changes: 79 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ programs. Key features include:
* [Time travel debugging][debug]
* Compatible with any editor

[hot-swapping]: http://elm-lang.org/blog/Interactive-Programming.elm
[debug]: http://debug.elm-lang.org
[hot-swapping]: http://elm-lang.org/blog/interactive-programming
[debug]: http://elm-lang.org/blog/time-travel-made-easy

This means you can get a great development experience whether you are using
Sublime Text, emacs, vim, or whatever else to edit Elm code.


## Install

Install [Elm Platform][platform]. This will install Elm Reactor and everything
else it needs.

[platform]: http://elm-lang.org/Install.elm
[platform]: http://elm-lang.org/install


## Use

Expand All @@ -42,6 +44,7 @@ Click on any file to see what it looks like. For example, you can navigate to
an Elm file and try it out. If you modify the file, you can just refresh that
page and see the new version!


#### Time Travel Debugging

To use the debugger, click the small wrench next to every Elm file. This will
Expand All @@ -54,27 +57,84 @@ start your Elm program with a control panel that lets you:
* Swap in new code at any time, maintaining all recorded events.


#### Debugging code embedded in HTML
## Building from Source

To use the debugger with more complex HTML or CSS, you may want to start the
debugger from within an HTML file. This process is still improving, so *use this
with caution*.
If you are interesting in modifying this project, here is what you need to do
as of 20 November 2015:

### Build Elm Platform

```bash
mkdir sandbox
cd sandbox
cabal sandbox init

git clone https://github.com/elm-lang/elm-compiler.git
cd elm-compiler
cabal sandbox init --sandbox ../.cabal-sandbox
cd ..

git clone https://github.com/elm-lang/elm-package.git
cd elm-package
cabal sandbox init --sandbox ../.cabal-sandbox
cd ..

git clone https://github.com/elm-lang/elm-make.git
cd elm-make
cabal sandbox init --sandbox ../.cabal-sandbox
cd ..

git clone https://github.com/elm-lang/core.git
cd core
git remote add vilterp [email protected]:vilterp/core.git
git fetch vilterp new-debugger-api-support
git checkout new-debugger-api-support
cd ..

git clone https://github.com/elm-lang/elm-reactor.git
cd elm-reactor
cabal sandbox init --sandbox ../.cabal-sandbox
git checkout expando
elm-package install
cd elm-stuff/packages/elm-lang/core
rm -rf 3.0.0
ln -s ../../../../../core 3.0.0
cd ../../../..

cd ../elm-compiler
cabal install
cd ../elm-package
cabal install
cd ../elm-make
cabal install
cd ../elm-reactor
git submodule init
git submodule update
```

In your custom HTML file, load the `/_reactor/debug.js` script.
Then most of your work will be in `elm-reactor/`, where you recompile with this:

```html
<script type="text/javascript" src="/_reactor/debug.js"></script>
```
./cabal-build.py
```

This does an extra check to see if any Elm files have changed and recompiles
accordingly. You will need to run this for any changes you make, whether they
are in Haskell or Elm.

That creates the `Elm.fullscreenDebug` function so you can initiate your Elm
program with the debugger:
The binaries will all go in `sandbox/.cabal-sandbox/bin` so that is where you
want to point for testing.

```javascript
var main = Elm.fullscreenDebug('MyProject.Main', 'MyProject/Main.elm');
### Run Development Reactor

cd into the directory of the project you want to debug, then:

```
elm-make --yes
pushd elm-stuff/packages/elm-lang/core
rm -rf 3.0.0
ln -s <path to core on branch new-debugger-api-support from vilterp fork of core> 3.0.0
popd
```

The first argument is the name of the module you would like to debug.
The second argument is the name of the source file for that module.
The file name is needed so that we know which file to recompile when
the Reactor detects that a file has changed. You may edit a dependency,
but we always need to compile from the root file.
...then invoke `elm-reactor` as normal and you should be able to use the new reactor. This linking step will be necessary until a version of core is published which has the changes on `vilterp-new-debugger-api-support` integrated.
45 changes: 0 additions & 45 deletions Setup.hs

This file was deleted.

Binary file removed assets/_reactor/debugger/pause-button-down.png
Binary file not shown.
Binary file removed assets/_reactor/debugger/pause-button-hover.png
Binary file not shown.
Binary file removed assets/_reactor/debugger/pause-button-up.png
Binary file not shown.
Binary file removed assets/_reactor/debugger/play-button-down.png
Binary file not shown.
Binary file removed assets/_reactor/debugger/play-button-hover.png
Binary file not shown.
Binary file removed assets/_reactor/debugger/play-button-up.png
Binary file not shown.
Binary file removed assets/_reactor/debugger/restart-button-down.png
Binary file not shown.
Binary file removed assets/_reactor/debugger/restart-button-hover.png
Binary file not shown.
Binary file removed assets/_reactor/debugger/restart-button-up.png
Binary file not shown.
Binary file removed assets/_reactor/wrench.png
Binary file not shown.
Binary file modified assets/favicon.ico
Binary file not shown.
Binary file added assets/waiting.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
122 changes: 0 additions & 122 deletions backend/Compile.hs

This file was deleted.

Loading

0 comments on commit ad09d01

Please sign in to comment.