-
Notifications
You must be signed in to change notification settings - Fork 27
Usage document doesn't say how to run output #485
Comments
The usage doc is now out of date as of 0.1.22: https://github.com/dart-lang/dev_compiler/blob/master/CHANGELOG.md Both the server code and the node runner code have been removed while we rework the core compiler to be modularly invocable from bazel, etc. We may add them back in or use something like package:build if that makes sense. You should still be able to point at an html file with a dart script and get a modified html file with js scripts. |
I've marked that doc deprecated for now. Whole program code has been removed from tip-of-tree. We're focused on modular compile right now. We can compile targets with DDC, but rely on other tools to link. Here are some notes (assuming This is all experimental (1) Download and build a nodejs v6.0 from here: https://nodejs.org/download/rc/ Note, this is a release candidate. You probably don't want to remove any stable versions (e.g, v5 based). v6 is required for harmony / ES6 support. (2) Create and cd into a test directory. Create a symlink to the node you built above (or just put it on your path). (3) Create a node version of the dart_sdk:
(4) Define a node path (you can add other directories if you want to separate things out):
(5) Compile a test file with a
Note, the (6) Run it via your node built in step 1:
(7) Compile multiple libraries using summaries. E.g., write a
Run world just like hello above:
(8) Node modules do not run directly on the browser or v8. You can use a tool like Install:
and run:
The produced |
This is great info! Worth bumping up to a top-level markdown doc? |
We should - and perhaps replace the Usage.md doc which is woefully out of date. Node v6 is scheduled to go stable tomorrow, so the instructions will get a bit easier. |
I've updated the USAGE.md doc with the instructions here. We're still working on improving this - see #613. |
The usage document explains how to compile an executable, but doesn't say how to run it.
Just pointing d8 at the generated file doesn't work.
The document also mentions
--server
, but my version (the most recent viapub global activate
, or viagit clone
) doesn't support that option.The text was updated successfully, but these errors were encountered: