This package has been deprecated

Author message:

please update to new errand worker components

errand-component-file

0.0.4 • Public • Published

#errand-component-file

errand task for working with files

errand-component-file is an errand component that is used to work with files

##Usage:

Example of how to use errand-component-file in errand task list follows.

{
  "tasks":
    [
      {
        "description": "task to append some data to a file",
        "task": "errand-component-file",
        "parameters":
          {
            "method": "append",
            "filename": "some.json",
            "data": {"foo": "bar"},
            "newline": true

          }
      }
    ]
}

Where:

  • description desribes task
  • task is the name of task
  • parameters.method instruction for task, options:
    • append append [data] to [filename] - note if [filename] does not exist it will be created
    • create create [filename] then append [data] - note if [filename] exists it will be overwritten
  • parameters.filename is the name of the file to apply [method] to
  • parameters.data contains data for file operation
  • parameters.newline if true append newline to [data]

Readme

Keywords

none

Package Sidebar

Install

npm i errand-component-file

Weekly Downloads

0

Version

0.0.4

License

none

Last publish

Collaborators

  • mattcam