diff --git a/lib/generators/console_simple_data.dart b/lib/generators/console_simple_data.dart index d89f2225..7dfac358 100644 --- a/lib/generators/console_simple_data.dart +++ b/lib/generators/console_simple_data.dart @@ -5,7 +5,7 @@ List data = [ "bin/main.dart", "text", - "Cm1haW4oTGlzdDxTdHJpbmc+IGFyZ3MpIHsKICBwcmludCgnSGVsbG8gd29ybGQhJyk7Cn0K", + "bWFpbihMaXN0PFN0cmluZz4gYXJncykgewogIHByaW50KCdIZWxsbyB3b3JsZCEnKTsKfQo=", "pubspec.yaml", "text", """bmFtZToge3twcm9qZWN0TmFtZX19CnZlcnNpb246IDAuMC4xCmRlc2NyaXB0aW9uOiBBIHNpbXBs diff --git a/lib/generators/server_appengine_data.dart b/lib/generators/server_appengine_data.dart index 1ef5e74b..f555ab26 100644 --- a/lib/generators/server_appengine_data.dart +++ b/lib/generators/server_appengine_data.dart @@ -76,36 +76,37 @@ cXVlc3QocmVxdWVzdCk7CiAgICB9IGVsc2UgewogICAgICByZXF1ZXN0LnJlc3BvbnNlCiAgICAg ICAgLi5zdGF0dXNDb2RlID0gSHR0cFN0YXR1cy5NRVRIT0RfTk9UX0FMTE9XRUQKICAgICAgICAu LndyaXRlKCdVbnN1cHBvcnRlZCBIVFRQIHJlcXVlc3QgbWV0aG9kOiAke3JlcXVlc3QubWV0aG9k fS4nKQogICAgICAgIC4uY2xvc2UoKTsKICAgIH0KICB9KS5jYXRjaEVycm9yKChfKSA9PiByZXF1 -ZXN0LnJlc3BvbnNlCiAgICAgIC4ud3JpdGUoJ0ZhaWxlZCBoYW5kbGluZyByZXF1ZXN0OiAke3Jl -cXVlc3QudG9TdHJpbmcoKX0uJykKICAgICAgLi5jbG9zZSgpKTsKfQoKLy8vIEdFVCByZXF1ZXN0 -IGhhbmRsZXIuCi8vLwovLy8gUGFyc2VzIHRoZSB1cmwgdG8gZGV0ZXJtaW5lIHdoYXQgY29tbWFu -ZCB0byBydW4gYW5kIHRoZSBjb3JyZXNwb25kaW5nCi8vLyBp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uc2VydmUoJy91c2FnZS5odG1sJyk7 +CiAgfQp9Cg==""", "build/web/usage.html", "text", """PCFET0NUWVBFIGh0bWw+Cgo8aHRtbD4KICA8aGVhZD4KICAJPG1ldGEgY2hhcnNldD0idXRmLTgi diff --git a/lib/generators/server_shelf_data.dart b/lib/generators/server_shelf_data.dart index a712582a..a7ca88fd 100644 --- a/lib/generators/server_shelf_data.dart +++ b/lib/generators/server_shelf_data.dart @@ -52,18 +52,18 @@ bGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLgoKaW1wb3J0ICdk YXJ0OmlvJzsKCmltcG9ydCAncGFja2FnZTphcmdzL2FyZ3MuZGFydCc7CmltcG9ydCAncGFja2Fn ZTpzaGVsZi9zaGVsZi5kYXJ0JyBhcyBzaGVsZjsKaW1wb3J0ICdwYWNrYWdlOnNoZWxmL3NoZWxm X2lvLmRhcnQnIGFzIGlvOwoKdm9pZCBtYWluKExpc3Q8U3RyaW5nPiBhcmdzKSB7CiAgdmFyIHBh -cnNlciA9IG5ldyBBcmdQYXJzZXIoKQogICAgICAuLmFkZE9wdGlvbigncG9ydCcsIGFiYnI6ICdw -JywgZGVmYXVsdHNUbzogJzgwODAnKTsKCiAgdmFyIHJlc3VsdCA9IHBhcnNlci5wYXJzZShhcmdz -KTsKCiAgdmFyIHBvcnQgPSBpbnQucGFyc2UocmVzdWx0Wydwb3J0J10sIG9uRXJyb3I6ICh2YWwp -IHsKICAgIHN0ZG91dC53cml0ZWxuKCdDb3VsZCBub3QgcGFyc2UgcG9ydCB2YWx1ZSAiJHZhbCIg -aW50byBhIG51bWJlci4nKTsKICAgIGV4aXQoMSk7CiAgfSk7CgogIHZhciBoYW5kbGVyID0gY29u -c3Qgc2hlbGYuUGlwZWxpbmUoKQogICAgICAuYWRkTWlkZGxld2FyZShzaGVsZi5sb2dSZXF1ZXN0 -cygpKQogICAgICAuYWRkSGFuZGxlcihfZWNob1JlcXVlc3QpOwoKICB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ZWxmLlJlcXVlc3QgcmVxdWVzdCkgewogIHJl +dHVybiBuZXcgc2hlbGYuUmVzcG9uc2Uub2soJ1JlcXVlc3QgZm9yICIke3JlcXVlc3QudXJsfSIn +KTsKfQo=""", "pubspec.yaml", "text", """bmFtZTogJ3t7cHJvamVjdE5hbWV9fScKdmVyc2lvbjogMC4wLjEKZGVzY3JpcHRpb246IEEgd2Vi diff --git a/lib/src/cli_app.dart b/lib/src/cli_app.dart index 02d9eff2..85c25130 100644 --- a/lib/src/cli_app.dart +++ b/lib/src/cli_app.dart @@ -98,8 +98,8 @@ class CliApp { if (options['help'] || args.isEmpty) { // Prompt to opt into advanced analytics. if (!analytics.hasSetOptIn) { - _out( - """Welcome to Stagehand! We collect anonymous usage statistics and crash reports in + _out(""" +Welcome to Stagehand! We collect anonymous usage statistics and crash reports in order to improve the tool (http://goo.gl/6wsncI). Would you like to opt-in to additional analytics to help us improve Stagehand [y/yes/no]? """); io.stdout.flush(); diff --git a/tool/grind.dart b/tool/grind.dart index 56114892..8d43e3ee 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -16,8 +16,7 @@ final RegExp _binaryFileTypes = new RegExp( main(List args) => grind(args); -@Task('Concatenate the template files into data files' - ' that the generators can consume') +@Task('Concatenate the template files into runtime data files') void build() { stagehand.generators.forEach((generator) { _concatenateFiles(