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

Unified Diff: pkg/polymer/lib/builder.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 | « no previous file | pkg/polymer/lib/deploy.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/builder.dart
diff --git a/pkg/polymer/lib/builder.dart b/pkg/polymer/lib/builder.dart
index e1879e0da07fd4c8d64135a9445b8e8620150d51..440c27230d07dc85c1d297f769ddf96473c4cb1a 100644
--- a/pkg/polymer/lib/builder.dart
+++ b/pkg/polymer/lib/builder.dart
@@ -214,7 +214,8 @@ Future deploy({List<String> entryPoints, CommandLineOptions options,
var transformOptions = new TransformOptions(
entryPoints: entryPoints,
directlyIncludeJS: options.directlyIncludeJS,
- contentSecurityPolicy: options.contentSecurityPolicy);
+ contentSecurityPolicy: options.contentSecurityPolicy,
+ releaseMode: options.releaseMode);
var barbackOptions = new BarbackOptions(
new PolymerTransformerGroup(transformOptions).phases,
@@ -260,9 +261,16 @@ class CommandLineOptions {
*/
final bool directlyIncludeJS;
+ /**
+ * Run transformers in release mode. For instance, uses the minified versions
+ * of shadow_dom and custom-elements polyfills.
+ */
+ final bool releaseMode;
+
CommandLineOptions(this.changedFiles, this.removedFiles, this.clean,
this.full, this.machineFormat, this.forceDeploy, this.outDir,
- this.directlyIncludeJS, this.contentSecurityPolicy);
+ this.directlyIncludeJS, this.contentSecurityPolicy,
+ this.releaseMode);
}
/**
@@ -318,6 +326,11 @@ CommandLineOptions parseOptions([List<String> args]) {
..addFlag('csp', help:
'replaces *.dart with *.dart.precompiled.js to comply with \n'
'Content Security Policy restrictions.')
+ ..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('help', abbr: 'h',
negatable: false, help: 'Displays this help and exit.');
@@ -342,5 +355,5 @@ CommandLineOptions parseOptions([List<String> args]) {
}
return new CommandLineOptions(res['changed'], res['removed'], res['clean'],
res['full'], res['machine'], res['deploy'], res['out'], res['js'],
- res['csp']);
+ res['csp'], !res['debug']);
}
« no previous file with comments | « no previous file | pkg/polymer/lib/deploy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698