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

Side by Side Diff: lib/dwc_shared.dart

Issue 11092092: Support compiling templates in the browser. Base URL: git@github.com:dart-lang/dart-web-components.git@master
Patch Set: Created 8 years, 2 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
« no previous file with comments | « lib/dwc.dart ('k') | lib/src/template/analyzer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, 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 /**
6 * Shared functionality used by command line and dartium dwc frontends.
7 * Once dart:io dependencies are all abstracted out into
8 * src/tempalte/file_system this file can go away and dwc.dart can be used
9 * by both command line and dartium frontends.
10 */
11 library dwc_shared;
12
13 import 'package:args/args.dart';
14 import 'src/template/cmd_options.dart';
15 import 'src/template/file_system.dart';
16 import 'src/template/file_system_memory.dart';
17 import 'src/template/world.dart';
18
19 ArgParser commandOptions() {
20 return new ArgParser()
21 ..addFlag('verbose', help: 'Display detail info', defaultsTo: false)
22 ..addFlag('clean', help: 'Remove all generated files', defaultsTo: false)
23 ..addFlag('dump', help: 'Dump AST', defaultsTo: false)
24 ..addFlag('suppress_warnings', help: 'Warnings not displayed',
25 defaultsTo: true)
26 ..addFlag('warnings_as_errors', help: 'Warning handled as errors',
27 defaultsTo: false)
28 ..addFlag('throw_on_errors', help: 'Throw on errors encountered',
29 defaultsTo: false)
30 ..addFlag('throw_on_warnings', help: 'Throw on warnings encountered',
31 defaultsTo: false)
32 ..addFlag('no_colors', help: 'Display errors/warnings in colored text',
33 defaultsTo: true)
34 ..addFlag('help', help: 'Displays this help message', defaultsTo: false);
35 }
36
37 void initHtmlWorld(CmdOptions opts) {
38 var fs = new MemoryFileSystem();
39 initializeWorld(fs, opts);
40
41 // TODO(terry): Should be set by arguments. When run as a tool these aren't
42 // set when run internaly set these so we can compile CSS and catch any
43 // problems programmatically.
44 // options.throwOnErrors = true;
45 // options.throwOnFatal = true;
46 // options.useColors = commandLine ? true : false;
47 }
OLDNEW
« no previous file with comments | « lib/dwc.dart ('k') | lib/src/template/analyzer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698