diff --git a/lib/generators/console_full_data.dart b/lib/generators/console_full_data.dart index bfe8d0f6..b5a6a1c4 100644 --- a/lib/generators/console_full_data.dart +++ b/lib/generators/console_full_data.dart @@ -56,7 +56,7 @@ bGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLgoKaW1wb3J0ICdw YWNrYWdlOl9fcHJvamVjdE5hbWVfXy9fX3Byb2plY3ROYW1lX18uZGFydCcgYXMgX19wcm9qZWN0 TmFtZV9fOwoKbWFpbihMaXN0PFN0cmluZz4gYXJndW1lbnRzKSB7CiAgcHJpbnQoJ0hlbGxvIHdv cmxkOiAke19fcHJvamVjdE5hbWVfXy5jYWxjdWxhdGUoKX0hJyk7Cn0K""", - "lib/projectName.dart", + "lib/__projectName__.dart", "text", """Ly8gQ29weXJpZ2h0IChjKSBfX3llYXJfXywgX19hdXRob3JfXy4gQWxsIHJpZ2h0cyByZXNlcnZl ZC4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUKLy8gaXMgZ292ZXJuZWQgYnkgYSBCU0Qtc3R5bGUg diff --git a/lib/generators/package_simple.dart b/lib/generators/package_simple.dart index 9da39471..17c2aa41 100644 --- a/lib/generators/package_simple.dart +++ b/lib/generators/package_simple.dart @@ -20,6 +20,6 @@ class PackageSimpleGenerator extends DefaultGenerator { addTemplateFile(file); } - setEntrypoint(getFile('lib/projectName.dart')); + setEntrypoint(getFile('lib/__projectName__.dart')); } } diff --git a/lib/generators/package_simple_data.dart b/lib/generators/package_simple_data.dart index c769b4d1..919f393c 100644 --- a/lib/generators/package_simple_data.dart +++ b/lib/generators/package_simple_data.dart @@ -53,7 +53,7 @@ IHsKICAgICAgdmFyIGF3ZXNvbWUgPSBuZXcgQXdlc29tZSgpOwogICAgfQoKIyMgRmVhdHVyZXMg YW5kIGJ1Z3MKClBsZWFzZSBmaWxlIGZlYXR1cmUgcmVxdWVzdHMgYW5kIGJ1Z3MgYXQgdGhlIFtp c3N1ZSB0cmFja2VyXVt0cmFja2VyXS4KClt0cmFja2VyXTogaHR0cDovL2V4YW1wbGUuY29tL2lz c3Vlcy9yZXBsYWNlbWUK""", - "example/projectName.dart", + "example/__projectName___example.dart", "text", """Ly8gQ29weXJpZ2h0IChjKSBfX3llYXJfXywgX19hdXRob3JfXy4gQWxsIHJpZ2h0cyByZXNlcnZl ZC4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUKLy8gaXMgZ292ZXJuZWQgYnkgYSBCU0Qtc3R5bGUg @@ -61,7 +61,7 @@ bGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLgoKbGlicmFyeSBf X3Byb2plY3ROYW1lX18uZXhhbXBsZTsKCmltcG9ydCAncGFja2FnZTpfX3Byb2plY3ROYW1lX18v X19wcm9qZWN0TmFtZV9fLmRhcnQnOwoKbWFpbigpIHsKICB2YXIgYXdlc29tZSA9IG5ldyBBd2Vz b21lKCk7CiAgcHJpbnQoJ2F3ZXNvbWU6ICR7YXdlc29tZS5pc0F3ZXNvbWV9Jyk7Cn0K""", - "lib/projectName.dart", + "lib/__projectName__.dart", "text", """Ly8gQ29weXJpZ2h0IChjKSBfX3llYXJfXywgX19hdXRob3JfXy4gQWxsIHJpZ2h0cyByZXNlcnZl ZC4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUKLy8gaXMgZ292ZXJuZWQgYnkgYSBCU0Qtc3R5bGUg @@ -70,7 +70,7 @@ X3Byb2plY3ROYW1lX18gbGlicmFyeS4KLy8vCi8vLyBUaGlzIGlzIGFuIGF3ZXNvbWUgbGlicmFy eS4gTW9yZSBkYXJ0ZG9jcyBnbyBoZXJlLgpsaWJyYXJ5IF9fcHJvamVjdE5hbWVfXzsKCi8vIFRP RE86IEV4cG9ydCBhbnkgbGlicmFyaWVzIGludGVuZGVkIGZvciBjbGllbnRzIG9mIHRoaXMgcGFj a2FnZS4KCmV4cG9ydCAnc3JjL19fcHJvamVjdE5hbWVfX19iYXNlLmRhcnQnOwo=""", - "lib/src/projectName_base.dart", + "lib/src/__projectName___base.dart", "text", """Ly8gQ29weXJpZ2h0IChjKSBfX3llYXJfXywgX19hdXRob3JfXy4gQWxsIHJpZ2h0cyByZXNlcnZl ZC4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUKLy8gaXMgZ292ZXJuZWQgYnkgYSBCU0Qtc3R5bGUg @@ -86,7 +86,7 @@ YXV0aG9yX18gPGVtYWlsQGV4YW1wbGUuY29tPgojaG9tZXBhZ2U6IGh0dHBzOi8vd3d3LmV4YW1w bGUuY29tCgplbnZpcm9ubWVudDoKICBzZGs6ICc+PTEuMC4wIDwyLjAuMCcKCiNkZXBlbmRlbmNp ZXM6CiMgIGxpYl9uYW1lOiBhbnkKCmRldl9kZXBlbmRlbmNpZXM6CiAgdGVzdDogJz49MC4xMi4w IDwwLjEzLjAnCg==""", - "test/projectName_test.dart", + "test/__projectName___test.dart", "text", """Ly8gQ29weXJpZ2h0IChjKSBfX3llYXJfXywgX19hdXRob3JfXy4gQWxsIHJpZ2h0cyByZXNlcnZl ZC4gVXNlIG9mIHRoaXMgc291cmNlIGNvZGUKLy8gaXMgZ292ZXJuZWQgYnkgYSBCU0Qtc3R5bGUg diff --git a/lib/stagehand.dart b/lib/stagehand.dart index 47071b83..7debddfa 100644 --- a/lib/stagehand.dart +++ b/lib/stagehand.dart @@ -118,7 +118,6 @@ abstract class Generator implements Comparable { return Future.forEach(files, (TemplateFile file) { var resultFile = file.runSubstitution(vars); String filePath = resultFile.path; - filePath = filePath.replaceAll('projectName', projectName); return target.createFile(filePath, resultFile.content); }); } diff --git a/templates/console-full/lib/projectName.dart b/templates/console-full/lib/__projectName__.dart similarity index 100% rename from templates/console-full/lib/projectName.dart rename to templates/console-full/lib/__projectName__.dart diff --git a/templates/package-simple/example/projectName.dart b/templates/package-simple/example/__projectName___example.dart similarity index 100% rename from templates/package-simple/example/projectName.dart rename to templates/package-simple/example/__projectName___example.dart diff --git a/templates/package-simple/lib/projectName.dart b/templates/package-simple/lib/__projectName__.dart similarity index 100% rename from templates/package-simple/lib/projectName.dart rename to templates/package-simple/lib/__projectName__.dart diff --git a/templates/package-simple/lib/src/projectName_base.dart b/templates/package-simple/lib/src/__projectName___base.dart similarity index 100% rename from templates/package-simple/lib/src/projectName_base.dart rename to templates/package-simple/lib/src/__projectName___base.dart diff --git a/templates/package-simple/test/projectName_test.dart b/templates/package-simple/test/__projectName___test.dart similarity index 100% rename from templates/package-simple/test/projectName_test.dart rename to templates/package-simple/test/__projectName___test.dart