Closed aaongr closed 2 years ago
Same issue here.
Dear felangel, An amazing and wonderful new day for all of us
I would like to assist you in the development of this amazing package (and others)...
Can you please tell me how can I do this? Is there a working space for collaborating, discussing things to be done, and assigned tasks, and monitor progress? It could be my honour if you accept my offer.
Thank you again for all those amazing things that you have done and continue to do for all of us I am grateful
With my warmest regards for an extraordinary continuation in our day
The problem exists in those 2 lines of code:
{{#snakeCase}}{{name_plural}}{{/snakeCase}}.add({{#snakeCase}}{{name_plural}}{{/snakeCase}}Item.copyWith(id: '${{{#snakeCase}}{{name_plural}}{{/snakeCase}}.length+1}'));
and
// {{#snakeCase}}{{name_plural}}{{/snakeCase}}.add({{#snakeCase}}{{name_plural}}{{/snakeCase}}Item.copyWith(id: '${{{#snakeCase}}{{name_plural}}{{/snakeCase}}.length+1}'));
The actual problem is the {{{
, one from the content and the other 2 from the {{#snakeCase}}{{name_plural}}{{/snakeCase}}
Can I instruct, somehow, mason to treat the first one ({) as a text and not as a special character? Like escaping in regex....
I've also just come across this - for some reason a specific template under my app/test
folder fails to interpolate even a single instance of {{name}}
. I suspect I am writing invalid syntax somewhere, but I searched and don't have the same {{{
(3 curly brackets) problem @aaongr described above. Will continue to investigate.
I think I have the same issue, I tried to create a file config like that =>
class {{client.pascalCase()}} extends AppConfig {
String? foo = '{{foo}}';
final String bar = '{{bar}}';
{{client.pascalCase()}}(String envString) : super(envString);
}
foo = test bar = test client = test as a result, I have :
class Test extends AppConfig {
String? foo = 'foo'; <--
final String bar = 'bar'; <--
Test(String envString) : super(envString);
}
Is this still an issue on the latest version of mason/mason_cli?
Closing for now but feel free to comment if you're still encountering this issue and provide a link to a reproduction sample, thanks!
Hello, A wonderful and amazing day for all of Us :)
First of all I would like to express my gratitude for this amazing tool and for all the other great stuff that you have made I started to use the mason and I have a strange behaviour
Description In my mason project (https://github.com/itgaia/itg_mason) I am using the
{{#snakeCase}}{{name_plural}}{{/snakeCase}}
in all of the files under__brick__
After I runmason make feature --on-conflict overwrite -o ~/dev/flutter/_itg_tutorials/dev_framework_tutorial --name_singular link --name_plural links
I get the messageGenerated 25 file(s)
and inside of them there is the~/dev/flutter/_itg_tutorials/dev_framework_tutorial/lib/src/features/links/data/links_repository_impl.dart (new)
file But when I open the generated file, inside of it the {{vars}} still exist.... Please note that the file name wasbricks/feature/__brick__/lib/src/features/{{#snakeCase}}{{name_plural}}{{/snakeCase}}/data/{{#snakeCase}}{{name_plural}}{{/snakeCase}}_repository_impl.dart
so it worked as expected in the file name...Steps To Reproduce
git@github.com:itgaia/itg_mason.git
mason make feature --on-conflict overwrite -o ./test_run --name_singular link --name_plural links
./test_run/lib/src/features/links/data/links_repository_impl.dart
import '{{#snakeCase}}{{name_plural}}{{/snakeCase}}_local_datasource.dart'; import '{{#snakeCase}}{{name_plural}}{{/snakeCase}}_model.dart'; import '{{#snakeCase}}{{name_plural}}{{/snakeCase}}_remote_datasource.dart'; import '../../../app/constants.dart'; import '../../../common/helper.dart'; import '../../../core/error/exception.dart'; import '../../../core/error/failures.dart'; import '../domain/{{#snakeCase}}{{name_plural}}{{/snakeCase}}_repository.dart';
const msgBaseSourceClass = '{{#pascalCase}}{{name_plural}}{{/pascalCase}}RepositoryImpl'; String msgBaseSourceMethod = ''; void msgLogInfo(String msg) => itgLogVerbose('[$msgBaseSourceClass/$msgBaseSourceMethod] $msg'); void msgLogError(String msg) => itgLogError('[$msgBaseSourceClass/$msgBaseSourceMethod] $msg');
class {{#pascalCase}}{{name_plural}}{{/pascalCase}}RepositoryImpl implements {{#pascalCase}}{{name_plural}}{{/pascalCase}}Repository { ..........