Skip to content

Files option standardization #54

@satazor

Description

@satazor

We choose to make keys as sources and values as destinations because it's more intuitive for tasks like cp and mv.

{
  'path/to/src': 'path/to/dest'
}

Though, for tasks like concat users want to specify multiple files to the same destination. With the current syntax, it would be something like:

{
  'path/to/src1, path/to/src2, path/to/src3': 'path/to/dest'
}

Please note that if there is a lot files to concat, things get ugly because we can't split over multiple lines. The only solution would be to create an option in the filter and use it.

Though, if we flip over the arguments like grunt is doing we can actually specify an array like this:

{
  'path/to/dest': ['path/to/src1', 'path/to/src2', 'path/to/src3']
}

If the number of sources get big, people can split them over multiple lines.
Please note that grunt standardizes files like this for every situation.

We need to discuss and decide if we want to maintain the current 'standard', opt for some tasks to be src/dst and others to be dst/src or to do it like grunt is doing. This will have direct impact on #50.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/107107-files-option-standardization?utm_campaign=plugin&utm_content=tracker%2F39683&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F39683&utm_medium=issues&utm_source=github).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions