@shanzhai/write-file-step
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

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

A Shanzhai step which writes to a binary or UTF-8 encoded text file, creating it if it does not exist, or replacing it if it does.

Usage

If within a trigger's event handler an instance of WriteFileStep similar to the following were to be returned:

new WriteFileStep(
  `A description of the operation being performed`,
  [`A`, `Path`, `To`, `A`, `File`, `To`, `Write`],
  new ConstantInput(`Example File Content`)
);

The file would be created with the given content (which could be a string, for a text file, or a Buffer, for a binary file).

If the file already existed, it would be overwritten.

If the file's parent directory did not exist, an error would be raised.

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

Readme

Keywords

none

Package Sidebar

Install

npm i @shanzhai/write-file-step

Weekly Downloads

2

Version

0.0.11

License

MIT

Unpacked Size

5.88 kB

Total Files

5

Last publish

Collaborators

  • jameswilddev