Skip to content

"createIndex" flag throws error #44

@Daveawb

Description

@Daveawb
Collaborator

The createIndex flag does not function properly.

No components are created if the folder structures requested don't exist. If the folder structures do exist and empty index file is created but no components are created.

Activity

PQTran

PQTran commented on Dec 4, 2020

@PQTran
Contributor

Hi @Daveawb , I'm wondering how can I reproduce your problem? I'm a bit interested in this bug

snaerth

snaerth commented on Dec 7, 2020

@snaerth
Owner

@Daveawb @PQTran thanks for taking interest in this. It is a little long since I created this. But if I remember correctly createIndex is only suppose to read components from the current folder and create an index file exporting those components. So not create components. Unless I am misunderstanding the main issue

Daveawb

Daveawb commented on Feb 5, 2021

@Daveawb
CollaboratorAuthor

@snaerth and @PQTran I believe this was introduced when I wrote the template code. It's been a while since I looked at this issue, I'll try and reproduce again and provide steps.

snaerth

snaerth commented on Feb 5, 2021

@snaerth
Owner

Awesome thanks @Daveawb

Daveawb

Daveawb commented on Feb 9, 2021

@Daveawb
CollaboratorAuthor

So here's how I reproduced it.

image

However without --createindex

image

Note that Test does not exist at the time of creating the component.

I understand that the original intention was not to create any components but in this case specifically, we're creating a component AND creating an index of all components. This probably should either be fixed to allow component creation and a base index, or documented. Alternatively a separate command for indexing might be clearer that doesn't accept any arguments so that you can't mix the two up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Daveawb@snaerth@PQTran

        Issue actions

          "createIndex" flag throws error · Issue #44 · snaerth/create-react-component-folder