Permalink
Browse files

Initial README

  • Loading branch information...
1 parent 4a26f67 commit b12ecfaa0c34556fbe1ab47bd0d2f71c9f4e066c @OpaOnWindowsNow committed Sep 6, 2012
Showing with 93 additions and 1 deletion.
  1. +93 −1 README.md
View
94 README.md
@@ -1,2 +1,94 @@
opa-dynamic
-===========
+===========
+
+## What is *opa-dynamic* ?
+*opa-dynamic* provides a project based 'verify & launch loop'. This make developpement with Opa even more fun and more productive.
+
+Any time you do a modification on your project, your project is verified by *Opa* compiler (syntax, semantics, client/server distribution ...) and launched.
+*opa-dynamic* is editor independant so it will work even in most environment.
+
+
+## Is my project supported ?
+It should work off-the-shelf with project created by opa-create or containing an `opa.conf` or a `Makefile` files.
+It can be easily customized to work with most projects.
+
+
+## How to use it ?
+Assuming your project is compatible with *opa-dynamic*, in a terminal, start *opa-dynamic*:
+
+`opa-dynamic --src-dir path/opa_project`
+
+You will be notifed of compilation error if any.
+On the terminal you should have a message:
+
+>Change detected: compilation OK, run OK
+
+And you should have in your notification area the following message:
+
+>Launched : opa_project
+
+
+Edit any opa file inside, like the code for your project home page page.
+The previous two message appears again, indicating that the modification has been processed.
+You can see the result immediatly using your browser. (`firefox localhost:2001`)
+
+Edit again, when the message Launched appears, you can reload the home page and see the results of your modifications.
+
+If your edit breaks the compilation or the launch, we will be notified.
+For instance, if you introduce a type error, we will have the following notification:
+
+
+>FAILURE : opa_project
+
+>Error: File "src/view/page.opa", line 1, characters 3-7, (1:3-1:7 | 3-7)
+
+>Type Conflict
+
+> (1:3-1:3) int
+
+> (1:5-1:7) float
+
+>
+
+> The types of the first argument and the second argument
+
+> of function + of stdlib.core should be the same
+
+You can correct the error and continue to work on your project, at any time the project is correct again, the last version will be launched and testable in your browser.
+
+
+## Is my Makefile supported ?
+If `make` build your project and `make run` launch or relaunch your project, then yes it is supported.
+
+
+## My Makefile is not supported, what should I do ?
+Assuming `make target1` is compiling your project, generating `target1.exe`.
+You can do:
+`opa-dynamic --src-dir path/opa_project --command "make target1.exe" --command "killall target1 && target1.exe"`
+See "How to use with project with custom build rules?" for explanations.
+
+
+## How to use with project with custom build rules ?
+
+You can give the list of command to build and launch your project.
+Be sure that relaunching is supported by terminating a previously launched version.
+The last command is assumed to be the launch command and its termination is not waited for. (if not use `--no-launch`)
+For instance:
+`opa-dynamic --src-dir path/opa_project --command "build_command" --command "killall launch.exe" --comand "launch.exe"`
+
+## How to use specific opa options without specifying --command in details ?
+You can use `--opa-opt`.
+For instance if your project is in classic syntax:
+`opa-dynamic --src-dir path/opa_project --opa-opt "--parser classic"`
+
+## How to avoid the `--src-dir` option ?
+The current directory will be use if `--src-dir` is omitted.
+
+## Are Mac and Windows supported ?
+*opa-dynamic* should work but the notification feature is not working.
+
+## Can notification appeared in my favorite text editor ?
+We plan to support notification in emacs and Sublime Text, and to provide a simple way to have it on other editor.
+
+## Can I make opa-dynamic better ?
+Yes you are welcomed for any contributions, bug fixes, doc fixes and new features.

0 comments on commit b12ecfa

Please sign in to comment.