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

Unified Diff: pkg/polymer/lib/deploy.dart

Issue 61193002: Add a build filter (only necessary HTML files are emitted) and logic to use .min.js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/lib/builder.dart ('k') | pkg/polymer/lib/src/build/build_filter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/deploy.dart
diff --git a/pkg/polymer/lib/deploy.dart b/pkg/polymer/lib/deploy.dart
index b79c351dcc399e88baf931c652ae3f5746bf1219..d3e41a2bde0fbe1b0411f862767ec642aa424119 100644
--- a/pkg/polymer/lib/deploy.dart
+++ b/pkg/polymer/lib/deploy.dart
@@ -42,10 +42,12 @@ main(List<String> arguments) {
if (test == null) {
var transformOps = new TransformOptions(
directlyIncludeJS: args['js'],
- contentSecurityPolicy: args['csp']);
+ contentSecurityPolicy: args['csp'],
+ releaseMode: !args['debug']);
options = new BarbackOptions(createDeployPhases(transformOps), outDir);
} else {
- options = _createTestOptions(test, outDir, args['js'], args['csp']);
+ options = _createTestOptions(
+ test, outDir, args['js'], args['csp'], !args['debug']);
}
if (options == null) exit(1);
@@ -60,7 +62,7 @@ main(List<String> arguments) {
createDeployPhases(options) => new PolymerTransformerGroup(options).phases;
BarbackOptions _createTestOptions(String testFile, String outDir,
- bool directlyIncludeJS, bool contentSecurityPolicy) {
+ bool directlyIncludeJS, bool contentSecurityPolicy, bool releaseMode) {
var testDir = path.normalize(path.dirname(testFile));
// A test must be allowed to import things in the package.
@@ -77,7 +79,8 @@ BarbackOptions _createTestOptions(String testFile, String outDir,
var phases = createDeployPhases(new TransformOptions(
entryPoints: [path.relative(testFile, from: pubspecDir)],
directlyIncludeJS: directlyIncludeJS,
- contentSecurityPolicy: contentSecurityPolicy));
+ contentSecurityPolicy: contentSecurityPolicy,
+ releaseMode: releaseMode));
return new BarbackOptions(phases, outDir,
currentPackage: packageName,
packageDirs: {packageName : pubspecDir},
@@ -113,6 +116,11 @@ ArgResults _parseArgs(arguments) {
'deploy replaces *.dart scripts with *.dart.js. This flag \n'
'leaves "packages/browser/dart.js" to do the replacement at runtime.',
defaultsTo: true)
+ ..addFlag('debug', help:
+ 'run in debug mode. For example, use the debug versions of the \n'
+ 'polyfills (shadow_dom.debug.js and custom-elements.debug.js) \n'
+ 'instead of the minified versions.',
+ defaultsTo: false)
..addFlag('csp', help:
'replaces *.dart with *.dart.precompiled.js to comply with \n'
'Content Security Policy restrictions.');
« no previous file with comments | « pkg/polymer/lib/builder.dart ('k') | pkg/polymer/lib/src/build/build_filter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698