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

Side by Side Diff: sdk/lib/_internal/pub/lib/src/command/build.dart

Issue 110013003: Issue 15037. Warn users if they have “assets” dir anywhere inside “web” dir (http://dartbug.com/150… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Escape "\" in RegExps. Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/command/serve.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub.command.build; 5 library pub.command.build;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:barback/barback.dart'; 9 import 'package:barback/barback.dart';
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 Future onRun() { 45 Future onRun() {
46 if (!dirExists(source)) { 46 if (!dirExists(source)) {
47 throw new ApplicationException('There is no "$source" directory.'); 47 throw new ApplicationException('There is no "$source" directory.');
48 } 48 }
49 49
50 cleanDir(target); 50 cleanDir(target);
51 51
52 var dart2jsTransformer; 52 var dart2jsTransformer;
53 var builtFiles = 0; 53 var builtFiles = 0;
54 54
55 return entrypoint.ensureLockFileIsUpToDate().then((_) { 55 return entrypoint.loadPackageGraph().then((graph) {
56 return entrypoint.loadPackageGraph();
57 }).then((graph) {
58 dart2jsTransformer = new Dart2JSTransformer(graph, mode); 56 dart2jsTransformer = new Dart2JSTransformer(graph, mode);
59 var builtInTransformers = [ 57 var builtInTransformers = [
60 dart2jsTransformer, 58 dart2jsTransformer,
61 new DartForwardingTransformer(mode) 59 new DartForwardingTransformer(mode)
62 ]; 60 ];
63 61
64 // Since this server will only be hit by the transformer loader and isn't 62 // Since this server will only be hit by the transformer loader and isn't
65 // user-facing, just use an IPv4 address to avoid a weird bug on the 63 // user-facing, just use an IPv4 address to avoid a weird bug on the
66 // OS X buildbots. 64 // OS X buildbots.
67 // TODO(rnystrom): Allow specifying mode. 65 // TODO(rnystrom): Allow specifying mode.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // TODO(nweiz): do something more principled when issue 6101 is fixed. 145 // TODO(nweiz): do something more principled when issue 6101 is fixed.
148 /// Ensures that the [name].js file is copied into [directory] in [target], 146 /// Ensures that the [name].js file is copied into [directory] in [target],
149 /// under `packages/browser/`. 147 /// under `packages/browser/`.
150 void _addBrowserJs(String directory, String name) { 148 void _addBrowserJs(String directory, String name) {
151 var jsPath = path.join( 149 var jsPath = path.join(
152 target, directory, 'packages', 'browser', '$name.js'); 150 target, directory, 'packages', 'browser', '$name.js');
153 ensureDir(path.dirname(jsPath)); 151 ensureDir(path.dirname(jsPath));
154 copyFile(path.join(entrypoint.packagesDir, 'browser', '$name.js'), jsPath); 152 copyFile(path.join(entrypoint.packagesDir, 'browser', '$name.js'), jsPath);
155 } 153 }
156 } 154 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/command/serve.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698