Skip to content

Implement transformers for the dcli pack command #169

@bsutton

Description

@bsutton

The 'dcli pack' command allows you to pack resources into a dart exe.

Sometimes it is desirable to apply transformations to these files before they are packed.

This might be to include a version no. in one of the configuration files.

My thoughts are that:

the user creates a transforms directory under their tool directory:
<project root>/dcli/pack/transforms

The user can then place one or more scripts in the transforms directory.

When the pack command is called it runs each of the scripts in the transform directory.
The pack command will apply the transforms in order after sorting them alphanumerically.
The user can control the order the transforms are applied by naming them with a numeric prefix 01_xx.dart, 02_xx.dart.

Each transform will take the arguments <resource name> <input file> <output file>

The input and output file will change between each transform but the resource name will be constant allowing the transform to choose what transformation are to be applied.

If the transform doesn't want to apply any transformations to the input file then it can simply copy the input file to the output file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions