update docs
This commit is contained in:
parent
8fb94d6c03
commit
a48e59bb61
1 changed files with 9 additions and 1 deletions
10
API.md
10
API.md
|
@ -107,10 +107,18 @@ When used in your transform, this will also register the file being transformed
|
|||
|
||||
Manually insert a virtual `File`, running it through the transform.
|
||||
|
||||
- `file` - the `file` data of the virtual file to add
|
||||
- `file` - the file data of the virtual file to add
|
||||
|
||||
The object does not need to be a `File` instance, and in fact there is no benefit to doing so. A new `File` instance is always created with properties `Object.assign`ed from `file`.
|
||||
|
||||
### `resolve(path)`
|
||||
|
||||
Resolves a path from the file being transformed, using your specified `resolver`.
|
||||
|
||||
- `path` - the path to resolve
|
||||
|
||||
Returns the resolved path. If you did not specify a `resolver` or if you are currently in a generator, this will be `path` unchanged.
|
||||
|
||||
## Events
|
||||
|
||||
`Defiler` extends Node's `EventEmitter`, and emits these events:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue