You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tooling/stacked-cli.md
+31-21Lines changed: 31 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -244,35 +244,45 @@ Now if you run `stacked create dialog error` you'll see that all the files are g
244
244
245
245
If you want to use `stacked_cli` in a package that doesn't fit the structure that the CLI expects, then you can configure Stacked to look in the correct places. Create a new file in the root folder of your package called `stacked.json`. Inside the file, create a JSON body with the following properties:
246
246
247
-
-`views_path`: The relative path where Views and ViewModels will be generated. Default: `ui/views`.
248
-
-`services_path`: The relative path where Services will be generated. Default: `services`.
249
-
-`bottom_sheets_path`: The relative path where BottomSheets will be generated. Default: `ui/bottom_sheets`.
250
-
-`dialogs_path`: The relative path where Dialogs will be generated. Default: `ui/dialogs`.
251
-
-`stacked_app_path`: The relative path to the file that contains the `StackedApp` setup. Default: `app/app.dart`.
252
-
-`test_helpers_path`: The relative path to the file that contains the test_helpers (mocks, registerService, etc). Default: `helpers/test_helpers.dart`.
253
-
-`test_services_path`: The relative path to where the Services' unit tests will be generated. Default: `services`.
254
-
-`test_views_path`: The relative path to where the ViewModels' unit tests will be generated. Default: `viewmodels`.
255
-
-`locator_name`: The name of the locator that Services are registered with. This is used when creating a new Service using the `create service` command. Default: `locator`.
256
-
-`register_mocks_function`: The name of the function that registers all the Mocks when running a test. This is used when generating a test file during `create service` command. Default: `registerServices`.
247
+
| Property | Description |
248
+
| -------- | ----------- |
249
+
| bottom_sheets_path | The path where BottomSheets will be generated. |
250
+
| dialogs_sheets_path | The path where Dialogs will be generated. |
251
+
| line_length | Passed into the Flutter formatter when running CLI commands. |
252
+
| locator_name | The name of the locator that Services are registered with. This is used when creating a new Service using the `create service` command. |
253
+
| prefer_web | Determines to use or not web template when no template argument is passed. |
254
+
| register_mocks_function | The name of the function that registers all the Mocks when running a test. This is used when generating a test file during `create service` command. |
255
+
| services_path | The path where Services will be generated. |
256
+
| stacked_app_file_path | The path to the file that contains the `StackedApp` setup. |
257
+
| test_helpers_file_path | The path to the file that contains the test helpers (mocks, registerService, etc). |
258
+
| test_services_path | The path where the unit tests of the Services will be generated. |
259
+
| test_views_path | The path where the unit tests of the ViewModels will be generated. |
260
+
| test_widgets_path | The path where the unit tests of the Widgets will be generated. |
261
+
| v1 | Indicates whether you want to use ViewModelBuilder (v1) or StackedView (v2). |
262
+
| views_path | The path where Views and ViewModels will be generated. |
263
+
| widgets_path | The path where Widgets and WidgetModels will be generated. |
257
264
258
265
Only include the paths you want to customize. If you exclude a path, the default value will be used for it.
0 commit comments