@shanzhai/delete-step

A Shanzhai step which deletes a file or directory (including any child files or directories) if it exists.

Usage no npm install needed!

<script type="module">
  import shanzhaiDeleteStep from 'https://cdn.skypack.dev/@shanzhai/delete-step';
</script>

README

@shanzhai/delete-step Continuous Integration License FOSSA Status Renovate enabled npm npm type definitions

A Shanzhai step which deletes a file or directory (including any child files or directories) if it exists.

Usage

Within a trigger's event handler, return an instance of DeleteStep similar to the following:

new DeleteStep(
  `A description of the operation being performed`,
  [`a`, `path`, `to`, `a`, `file`, `or`, `directory`, `to`, `delete`]
)

If a file or directory called a/path/to/a/file/or/directory/to/delete exists, it will be deleted.

Directories will be deleted even if they are not empty.

If no such file or directory exists, nothing happens.

Dependencies

This package has no runtime dependencies.

Peer Dependencies

This package has no runtime peer dependencies (it does not expect any other packages to be installed alongside itself).

License

FOSSA Status