Skip to content

teem2/dreem2

Repository files navigation

Dreem2

Dreem with multiple screens, IOT and backwards compatibility for dre syntax.

Getting Started with Dreem

It is quick and easy to get started writing your dreem application, first install Node.js v0.10.x, and then clone the repo:

git clone https://github.com/teem2/dreem2.git

You will need to serve the dreem files through a web server to satisfy the browser's same-origin policy. To start the dreem server just run: > cd > node server

This will turn that directory into a webserver and allow you to run any of the example files on localhost, such as http://localhost:8080/example_spirallayout

You can open a page with all the examples here: http://localhost:8080/examplelinks

Running the Visual Editor

You can use the visual editor in two ways:

Edit mode: http://localhost:8080/compositions/example/editor.dre?edit=1

Preview mode: http://localhost:8080/compositions/example/editor.dre

If you have any issues, try these steps:

  1. Shut down the server
  2. Make sure the file you are trying to edit is current (that you have the latest code from the repository)
  3. Start the server (node server.js)
  4. Start either edit or preview mode using the URLs above.

Running Smoke Tests

(Important! See the README.md file in /3rd_party for a temporary workaround for phantomjs 2. You will not want to do the npm install if you're on the latest OSX)

The smoke tests docs are run with http://phantomjs.org/ 2.0, so you'll need to install it with:

npm install phantomjs@2.0

After you've installed it, run:

> cd <your dreem installation root>
> phantomjs ./bin/phantomrunner.js

Finally, you may get better performance if you utilize phantom's disk cache:

> phantomjs ./bin/phantomrunner.js 100 --disk-cache

You can also target a specific smoke tests by naming it on the commandline. All tests that contain that name will be run.

> phantomjs ./bin/phantomrunner.js view

Other Notes

Dreem2 introduces the concept of "compositions". These combine client and server side functionality together into a single dre file. What you would have thought of as a page in dreem1 is now a "screen" which is found within a composition.

Compositions are served out of the compositions directory under dreem root.