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

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

Issue 372983006: Add file-filter flag to polymer deploy (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/polymer/lib/src/build/runner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/deploy.dart
===================================================================
--- pkg/polymer/lib/deploy.dart (revision 38021)
+++ pkg/polymer/lib/deploy.dart (working copy)
@@ -36,6 +36,10 @@
var test = args['test'];
var outDir = args['out'];
+ var filters = [];
+ if (args['file-filter'] != null) {
+ filters = args['file-filter'].split(',');
+ }
var options;
if (test == null) {
@@ -50,7 +54,8 @@
packagePhases: {'polymer': phasesForPolymer});
} else {
options = _createTestOptions(
- test, outDir, args['js'], args['csp'], !args['debug']);
+ test, outDir, args['js'], args['csp'], !args['debug'],
+ filters);
}
if (options == null) exit(1);
@@ -63,7 +68,8 @@
}
BarbackOptions _createTestOptions(String testFile, String outDir,
- bool directlyIncludeJS, bool contentSecurityPolicy, bool releaseMode) {
+ bool directlyIncludeJS, bool contentSecurityPolicy, bool releaseMode,
+ List<String> filters) {
var testDir = path.normalize(path.dirname(testFile));
@@ -101,7 +107,8 @@
// TODO(sigmund): include here also smoke transformer when it's on by
// default.
packagePhases: {'polymer': phasesForPolymer},
- transformTests: true);
+ transformTests: true,
+ fileFilter: filters);
}
String _findDirWithFile(String dir, String filename) {
@@ -140,6 +147,9 @@
defaultsTo: false, negatable: false)
..addOption('out', abbr: 'o', help: 'Directory to generate files into.',
defaultsTo: 'out')
+ ..addOption('file-filter', help: 'Do not copy in files that match \n'
+ 'these filters to the deployed folder, e.g., ".svn"',
+ defaultsTo: null)
..addOption('test', help: 'Deploy the test at the given path.\n'
'Note: currently this will deploy all tests in its directory,\n'
'but it will eventually deploy only the specified test.')
« no previous file with comments | « no previous file | pkg/polymer/lib/src/build/runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698