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

Side by Side Diff: pkg/fletchc/lib/src/verbs/export_verb.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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 | « pkg/fletchc/lib/src/verbs/documentation.dart ('k') | pkg/fletchc/lib/src/verbs/help_verb.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) 2015, the Dartino 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.md file.
4
5 library fletchc.verbs.export_verb;
6
7 import 'infrastructure.dart';
8
9 import 'documentation.dart' show
10 exportDocumentation;
11
12 import '../worker/developer.dart' show
13 compileAndAttachToVmThen;
14
15 import '../worker/developer.dart' as developer;
16
17 const Action exportAction =
18 const Action(
19 export, exportDocumentation, requiresSession: true,
20 requiresToUri: true,
21 supportedTargets: const <TargetKind>[TargetKind.FILE]);
22
23 Future<int> export(AnalyzedSentence sentence, VerbContext context) {
24 return context.performTaskInWorker(
25 new ExportTask(sentence.targetUri, sentence.toTargetUri, sentence.base));
26 }
27
28 class ExportTask extends SharedTask {
29 // Keep this class simple, see note in superclass.
30
31 final Uri script;
32
33 final Uri snapshot;
34
35 final Uri base;
36
37 const ExportTask(this.script, this.snapshot, this.base);
38
39 Future<int> call(
40 CommandSender commandSender,
41 StreamIterator<ClientCommand> commandIterator) {
42 return exportTask(
43 commandSender, commandIterator, SessionState.current, script, snapshot,
44 base);
45 }
46 }
47
48 Future<int> exportTask(
49 CommandSender commandSender,
50 StreamIterator<ClientCommand> commandIterator,
51 SessionState state,
52 Uri script,
53 Uri snapshot,
54 Uri base) async {
55 return compileAndAttachToVmThen(
56 commandSender,
57 commandIterator,
58 state,
59 script,
60 base,
61 true,
62 () => developer.export(state, snapshot));
63 }
OLDNEW
« no previous file with comments | « pkg/fletchc/lib/src/verbs/documentation.dart ('k') | pkg/fletchc/lib/src/verbs/help_verb.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698