Skip to content

addMany has strange behavior for files with only one extension #370

@SupernaviX

Description

@SupernaviX

Hi!

I was trying to use plop to scaffold a new server, and I saw that addMany had some strange behavior on dockerfiles. When my template directory contained a Dockerfile.hbs and Dockerfile.test.hbs, the target directory contains Dockerfile.hbs and Dockerfile.test. Plop strips the extension from the test file, but not the main one.

I think the reason is that the main file only has the .hbs extension. Looking at the implementation, it looks like extension stripping only works if there's still an extension left after the .hbs is removed.

Is this a bug? Or is it a feature? And either way, would you accept a pull request to change that behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions