feature_folder_cli_plus 1.0.2 copy "feature_folder_cli_plus: ^1.0.2" to clipboard
feature_folder_cli_plus: ^1.0.2 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 are provider, getx, cubit, and bloc.
  • -p <path>: Specifies the path where the feature folder should be created.

Supported Types #

  • provider
  • getx
  • cubit
  • bloc

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.

3
likes
160
points
74
downloads

Publisher

unverified uploader

Weekly Downloads

CLI utility that generates a folder structure to reduce the repetitive work required to setup directories for models, services, repositories, screens and widgets.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

ansicolor, args, mason, path

More

Packages that depend on feature_folder_cli_plus