-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
Here are instructions to get the code working on your computer (based on instructions originally written by John Sarracino).
EDDIE depends on node.js and several npm libraries, typescript and cassowary.
Install node.js, following the instructions on their website. I recommend using your OS's package manager, either homebrew on Macs or apt on linux. (Note, if you're on a Mac, you might need to install homebrew before you can use it.)
For a mac:
brew install node
Here are the step that I (Ben) did on a Mac that already had homebrew and node:
brew update
brew upgrade node
brew link --overwrite node
npm install -g npm
Note: I first did chown -R $USER /usr/local
because my permissions were a bit messed up.
Note: I had to run brew link --overwrite node
because I (think) I had a previously installed non-homebrew version of node.
npm install -g typescript
- Clone EDDIE to a stable place on your computer (i.e., not
tmp
):git clone https://github.com/UCSD-PL/ed-vis-gen
- Change to the
develop
branch:
cd ed-vis-gen
git checkout develop
Unfortunately, we can't use npm's version of cassowary and instead must build it locally and tell npm to link it.
- Clone cassowary to a stable place on your computer (i.e., not
tmp
):git clone https://github.com/slightlyoff/cassowary.js/
- Add cassowary to homebrew by running the following commands:
cd <directory-of-cassowary-code>
npm link
cd <directory-of-eddie-repo>/src
npm link cassowary
In the ed-vis-gen
directory, run the following command: npm run-script initialize
Every time you update the code, run
npm run-script build
This will run tsc, browserify,and several rsyncs, and will place everything in new/target/.
If you open new/target/html/index.html
with chrome, you should see EDDIE. Firefox should work
as well, but Safari is broken because it doesn't support ES6. I haven't tested
IE/Edge and don't intend to unless I have to :).
The directories "src/model", "src/view", "src/controller", "src/static/html/", and "src/util" contain stuff worth looking at: of particular interest are "src/main.ts" and "src/static/html/index.html"/ "src/static/html/style.css", as they're the most visible code.
Two things to keep in mind:
-
the typescript compiler (tsc) puts the javascript translation of a typescript file in place e.g. after running tsc, "src/main.js" is the translation of "src/main.ts".
-
changes to src files aren't reflected until you run "npm run-script build".