Code Monkey home page Code Monkey logo

index_generator's People

Contributors

brex900 avatar caijinglong avatar simonebressan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

index_generator's Issues

Using index_generator.yaml fails

Hi
It works only when adding the instruction in pubspec.yaml.
If I add the instructions only in a separated index_generator.yaml it returns:
�[39m�[31mline 1, column 1 of pubspec.yaml: Missing key "index_generator". type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' in type cast

index_generator:
  default_name: '_exports'
  exclude:
    - '**.g.dart'
    - '**_state.dart'
    - '**_event.dart'
    - 'imports.dart'
    - '_exports.dart'
  indexes: 
    - path: 'lib/presentation'
      name: '_exports'
    - path: 'lib/core'
      name: '_exports'
    - path: 'lib/logic'
      name: '_exports'
    - path: 'lib/data_providers'
      name: '_exports'

Is it possible to generate recursively indexes for nested folders ?

Hi.

Let us assume we have the following folder structure

lib/src/features

The features folder can contain any number of features.
Example

lib/src/features/home
lib/src/features/login

I want to find a way to configure this tool to build indexes automatically at every root folder under /features/
Example

lib/src/features/home/home.dart
This will export all the stuff defined under lib/src/features/home/presentation|data etc

The same should happen for
lib/src/features/login/login.dart

I don't know if this is possible and if yes how to configure it.

At the moment, I can only export a library named features right now with the following config:

index_generator:
  exclude:
    - '**.part.dart'
    - '**.g.dart'
    - '**.freezed.dart'
  indexes:
    - path: lib/src/features
      include:
        - '**'
      name: features
      library: features

Don't modify files unnecessarily

Great package! But there is a problem: generator overwrites index files even when there are no changes. This is noticed by the git, and added to the changes.

image
image

Name alias using 'as' keyword

Are there any possibilities to add name aliases for exported path?
Tried

exports:
      - package: package:flutter/materials.dart
         as:
         - materials

but this is not the solution. Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.