feature_folder_cli_plus 1.0.3
feature_folder_cli_plus: ^1.0.3 copied to clipboard
CLI utility that generates a folder structure to reduce the repetitive work required to setup directories for models, services, repositories, screens and widgets.
Folder by Feature CLI Utility π #
A Dart CLI tool that generates a folder structure based on the folder-by-feature pattern. This tool simplifies setting up the required directory structure for models, services, repositories, screens, and widgets, reducing the repetitive setup work.
This tool builds on the original feature_folder_cli, which hasn't been maintained for over 1.5 years. This version introduces enhancements and improvements, making it a more robust and up-to-date solution.
Folder Structure π #
The CLI generates the following folder structure for each feature:
feature/
β£ domain/
β β£ models/
β β£ repository/
β β£ services/
β β index.dart
β£ screens/
β β£ feature_screen.dart
β β index.dart
β£ widgets/
β β£ feature_component.dart
β β index.dart
β£ providers/
β β£ feature_provider.dart
β β index.dart
β index.dart
Command Usage π§ #
Make sure you are in the root of your project
ff generate -n <feature_name> -t <type> -p <path>
-n <feature_name>: Specifies the name of the feature.-t <type>: Specifies the state management type. Supported values areprovider,getx,cubit, andbloc.-p <path>: Specifies the path where the feature folder should be created.
Supported Types #
providergetxcubitbloc
Example Usage π§ #
ff generate -n Example -t provider -p features
ff generate -n Example -t getx -p features
ff generate -n Example -t cubit -p features
ff generate -n Example -t bloc -p features
Each command will generate the folder structure and initial files for the specified feature.
Installation β #
To install this utility, run the following command:
dart pub global activate feature_folder_cli_plus
Then, ensure that Dart's bin directory is added to your system's PATH to use the ff command globally.
License π #
This project is licensed under the MIT License. See the LICENSE file for details.