Skip to content

Commit

Permalink
adding docs for contents and path
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelCastillo committed Jan 3, 2018
1 parent aefdbcd commit b2f1972
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,27 @@ Constructor to create file instances. A file instance contains an `src` property
- **`options.src`** { string | string[] } - Source file paths. These can be globs.
- **`options.dest`** { string } - Destination file path.
- **`options.resolve`** { boolean } - Flag to disable glob resolution.
- **`options.path`** { string } - String path. Does not support glob resolution and so it is not affected by `resolve` flag.
- **`options.contents`** { string | Buffer } - File contents.
- **`cwd`** { string } - Current working directory to resolve `src` files relative to. If one isn't provided then `process.cwd()` is used.

> `src` file paths can be globs and are resolved relative to process.cwd() or `cwd` if that is provided. `dest` files are always resolved relative to process.cwd().

## setPath(path) : File

Method to configure the file `path`. `path` does not support glob resolution. For that, please use the `src` field instead. Furthermore, this is completely independent from `src`.

- **`path`** { string } - File path to configure. Glob paths won't be resolved.


## setContents(contents) : File

Method to configure the contents of a File instance. This is commenly used with `path` in order to give enough information for where contents is coming from.

- **`contents`** { string | Buffer } - The file contents to configure for the File instance.


## setSrc(src) : File

Method to configure `src` file paths.
Expand Down

0 comments on commit b2f1972

Please sign in to comment.