diff --git a/.gitignore b/.gitignore index c5b533e..ef8df60 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,6 @@ Thumbs.db *.iml .vscode/ .vs/ + +# Avoid ignore .vscode folder under templates +!**/templates/**/.vscode diff --git a/lib/src/templates/app/mobile/.vscode/settings.json.stk b/lib/src/templates/app/mobile/.vscode/settings.json.stk new file mode 100644 index 0000000..f04b133 --- /dev/null +++ b/lib/src/templates/app/mobile/.vscode/settings.json.stk @@ -0,0 +1,6 @@ +{ + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "*.dart": "\$\{capture}.mobile.dart, \$\{capture}.tablet.dart, \$\{capture}.desktop.dart, \$\{capture}.form.dart, \$\{capture}.g.dart, \$\{capture}.freezed.dart, \$\{capture}.logger.dart, \$\{capture}.locator.dart, \$\{capture}.router.dart, \$\{capture}.dialogs.dart, \$\{capture}.bottomsheets.dart" + } +} diff --git a/lib/src/templates/app/web/.vscode/settings.json.stk b/lib/src/templates/app/web/.vscode/settings.json.stk new file mode 100644 index 0000000..f04b133 --- /dev/null +++ b/lib/src/templates/app/web/.vscode/settings.json.stk @@ -0,0 +1,6 @@ +{ + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "*.dart": "\$\{capture}.mobile.dart, \$\{capture}.tablet.dart, \$\{capture}.desktop.dart, \$\{capture}.form.dart, \$\{capture}.g.dart, \$\{capture}.freezed.dart, \$\{capture}.logger.dart, \$\{capture}.locator.dart, \$\{capture}.router.dart, \$\{capture}.dialogs.dart, \$\{capture}.bottomsheets.dart" + } +} diff --git a/lib/src/templates/compiled_template_map.dart b/lib/src/templates/compiled_template_map.dart index e0cab7e..7e2cd13 100644 --- a/lib/src/templates/compiled_template_map.dart +++ b/lib/src/templates/compiled_template_map.dart @@ -155,6 +155,10 @@ Map> kCompiledStackedTemplates = { relativeOutputPath: kAppWebTemplatePubspecYamlStkPath, content: kAppWebTemplatePubspecYamlStkContent, fileType: FileType.text), + TemplateFile( + relativeOutputPath: kAppWebTemplateSettingsJsonStkPath, + content: kAppWebTemplateSettingsJsonStkContent, + fileType: FileType.text), ], modificationFiles: [], ), @@ -248,6 +252,10 @@ Map> kCompiledStackedTemplates = { relativeOutputPath: kAppMobileTemplatePubspecYamlStkPath, content: kAppMobileTemplatePubspecYamlStkContent, fileType: FileType.text), + TemplateFile( + relativeOutputPath: kAppMobileTemplateSettingsJsonStkPath, + content: kAppMobileTemplateSettingsJsonStkContent, + fileType: FileType.text), ], modificationFiles: [], ), diff --git a/lib/src/templates/compiled_templates.dart b/lib/src/templates/compiled_templates.dart index 55d73f0..23ef3f9 100644 --- a/lib/src/templates/compiled_templates.dart +++ b/lib/src/templates/compiled_templates.dart @@ -1916,6 +1916,24 @@ flutter: // -------------------------------------------------- +// -------- SettingsJsonStk Template Data ---------- + +const String kAppWebTemplateSettingsJsonStkPath = + '.vscode/settings.json.stk'; + +const String kAppWebTemplateSettingsJsonStkContent = ''' +{ + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "*.dart": "\$\{capture}.mobile.dart, \$\{capture}.tablet.dart, \$\{capture}.desktop.dart, \$\{capture}.form.dart, \$\{capture}.g.dart, \$\{capture}.freezed.dart, \$\{capture}.logger.dart, \$\{capture}.locator.dart, \$\{capture}.router.dart, \$\{capture}.dialogs.dart, \$\{capture}.bottomsheets.dart" + } +} + +'''; + +// -------------------------------------------------- + + // -------- StackedJsonStk Template Data ---------- const String kAppMobileTemplateStackedJsonStkPath = @@ -3111,6 +3129,24 @@ flutter: // -------------------------------------------------- +// -------- SettingsJsonStk Template Data ---------- + +const String kAppMobileTemplateSettingsJsonStkPath = + '.vscode/settings.json.stk'; + +const String kAppMobileTemplateSettingsJsonStkContent = ''' +{ + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "*.dart": "\$\{capture}.mobile.dart, \$\{capture}.tablet.dart, \$\{capture}.desktop.dart, \$\{capture}.form.dart, \$\{capture}.g.dart, \$\{capture}.freezed.dart, \$\{capture}.logger.dart, \$\{capture}.locator.dart, \$\{capture}.router.dart, \$\{capture}.dialogs.dart, \$\{capture}.bottomsheets.dart" + } +} + +'''; + +// -------------------------------------------------- + + // -------- GenericDialogModelTest Template Data ---------- const String kDialogEmptyTemplateGenericDialogModelTestPath =