fov icon indicating copy to clipboard operation
fov copied to clipboard

how do you run this?

Open bsabiston opened this issue 6 years ago • 1 comments

I read your "What the Hero Sees" blog and wanted to try out this demo code -- it seems to have more than what is on the blog page. How do I compile/run it on a mac? I tried double-clicking the 'index.html' and see a web page with text and four blank boxes that don't do anything. I tried downloading and installing dart SDK via command line, but trying to run them that way gives me lots of errors.

bsabiston avatar Jan 12 '19 21:01 bsabiston

@bsabiston If you're still interested, I was able to run it. Here's how:

  1. download dart 2.10.0+ for webdev debugging
  2. change the pubspec.yaml to (downgraded this from 1.0.0 because I don't understand dart so well and I didn't know how to fix the error for Tile class)
name: fov
dependencies:
  js: ^0.6.4
  piecemeal: ^0.4.2

environment:
  sdk: '>=2.10.0 <3.0.0'

dev_dependencies:
  build_runner:  <3.0.0
  build_web_compilers: <4.0.0
  1. Change the index.html line 44 to <script src="main.dart.js"></script> (js package now generates main.dart.js instead of browser package generating packages/browser/dart.js (or whatever it was before))
  2. Download IntelliJ and open the project (just open the fov folder with it).
  3. Apply the downloaded dart-sdk 2.10.0+ to the project
  4. Run pub get from pubspec.yaml file view
  5. Add a dart web configuration with index.html as the HTML file to run.
  6. That should be it! Hope it works for you! Feel free to ask questions if anyone still is interested in this and wants to run it. image

tsaulic avatar Jun 08 '22 08:06 tsaulic