Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/devcetra/df_generate_dart_indexes

A tool to generate index/exports files also known as barrel files for all Dart files in a directory.
https://github.com/devcetra/df_generate_dart_indexes

barrel-file build-runner cli code-generation codegen dart index index-files tool

Last synced: about 5 hours ago
JSON representation

A tool to generate index/exports files also known as barrel files for all Dart files in a directory.

Awesome Lists containing this project

README

        

# DF - Generate Dart Indexes

Buy Me A Coffee

Dart & Flutter Packages by DevCetra.com & contributors.

[![Pub Package](https://img.shields.io/pub/v/df_generate_dart_indexes.svg)](https://pub.dev/packages/df_generate_dart_indexes)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://raw.githubusercontent.com/robmllze/df_generate_dart_indexes/main/LICENSE)

---

## Summary

A tool to generate index/exports files also known as barrel files for all Dart files in a directory.

## Usage Instructions

1. You do not need to add this package to your pubspec.yaml file.
2. Activate the tool by running: `dart pub global activate df_generate_dart_indexes`.
3. Navigate to a folder in your project using the terminal (Tip: If you're using VS Code, you can right-click on a folder and select `"Open in Integrated Terminal"`).
4. Run `genidx -s .` or just `genidx` to generate an `_index.g.dart` file at the current location `.`.

### Note:

Files that start with an underscore, files in folders that start with an underscore, and generated files (those with the `.g.dart` extension) will be omitted from `_index.g.dart`.

### Generated File Example:

The file barrel file will look something like this, and is generated from [this default template file](https://github.com/robmllze/df_generate_dart_indexes/blob/main/templates/template.dart.md):

```dart
//.title
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//
// GENERATED - DO NOT MODIFY BY HAND
// See: https://pub.dev/packages/df_generate_dart_indexes
//
// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
//.title~

// --- PUBLIC FILES ---
export 'generate_index_files_for_dart.dart';
export 'run_generate_index_files_for_dart_app.dart';

// --- PRIVATE FILES (EXCLUDED) ---
// export '_utils/_generator_converger.dart';
// export '_utils/_insight_mappers.dart';

// --- GENERATED FILES (EXCLUDED) ---
// export '_index.g.dart';
```

---

## Contributing and Discussions

This is an open-source project, and we warmly welcome contributions from everyone, regardless of experience level. Whether you're a seasoned developer or just starting out, contributing to this project is a fantastic way to learn, share your knowledge, and make a meaningful impact on the community.

### Ways you can contribute:

- **Buy me a coffee:** If you'd like to support the project financially, consider [buying me a coffee](https://www.buymeacoffee.com/robmllze). Your support helps cover the costs of development and keeps the project growing.
- **Share your ideas:** Every perspective matters, and your ideas can spark innovation.
- **Report bugs:** Help us identify and fix issues to make the project more robust.
- **Suggest improvements or new features:** Your ideas can help shape the future of the project.
- **Help clarify documentation:** Good documentation is key to accessibility. You can make it easier for others to get started by improving or expanding our documentation.
- **Write articles:** Share your knowledge by writing tutorials, guides, or blog posts about your experiences with the project. It's a great way to contribute and help others learn.

No matter how you choose to contribute, your involvement is greatly appreciated and valued!

---

### Chief Maintainer:

📧 Email _Robert Mollentze_ at [email protected]

### Dontations:

If you're enjoying this package and find it valuable, consider showing your appreciation with a small donation. Every bit helps in supporting future development. You can donate here:

https://www.buymeacoffee.com/robmllze

---

## License

This project is released under the MIT License. See [LICENSE](https://raw.githubusercontent.com/robmllze/df_generate_dart_indexes/main/LICENSE) for more information.