Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: lib/runtime/run.js

Issue 2249233002: fix #626, add AMD module format and make it default (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: fix tests and other changes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 var fs = require('fs');
6 var vm = require('vm');
7
8 function __load(path) {
9 var data = fs.readFileSync(path);
10 var script = vm.createScript(data.toString(), path);
11 script.runInThisContext();
12 }
13
14 var args = process.argv.slice(2);
15 var argc = args.length;
16
17 for (var i = 0; i < argc-1; ++i) {
18 __load(args[i]);
19 }
20
21 var main = vm.createScript(args[argc-1] + '.main()', 'main');
22 main.runInThisContext();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698