API Docs for: 0.3.0
Show:

Writer Class

Defined in: lib/util/writer.js:43
Module: io

abstract interface for writing files and assets. The caller is expected to call done on the writer after it has finished writing all the required files. The writer is an event-emitter that emits a done event when done is called on it and all files have successfully been written.

Constructor

Writer

()

Item Index

Methods

copyFile

(
  • source
  • dest
)

copies a file from source to destination

Parameters:

  • source String

    the file to copy, found on the file system

  • dest String

    the destination path

done

()

marker method to indicate that the caller is done with this writer object The writer is expected to emit a done event only after this method is called and it is truly done.

writeFile

(
  • file
  • callback
)

allows writing content to a file using a callback that is passed a content writer

Parameters:

  • file String

    the name of the file to write

  • callback Function

    the callback that is called as callback(contentWriter)