Skip to content

accept URL for paths for setup files option #69

Description

@thescientist13

Gallinago has an option to accept an array of source / destination paths for setting up files related to running Gallinago. Currently is assumes / is documented as using Node's path function.

await runner.setup(__dirname, [{
  source: path.join(process.cwd(), 'node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js'),
  destination: path.join(__dirname, 'build', 'webcomponents-bundle.js')
}], {
  create: true
});

Instead, it would be preferable to accept instances of URL as they are a web standard, e.g.

await runner.setup(__dirname, [{
  source: new URL('./path/to/your/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js', import.meta.url),
  destination: new URL('./build/webcomponents-bundle.js', import.meta.url)
}], {
  create: true
});

This would require an update to the docs and the setup function to assume a URL and use pathname when running the fs functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions