Skip to content

Commit 08015a3

Browse files
committed
Document input/output object shape
1 parent 8a0da51 commit 08015a3

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

readme.markdown

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,30 @@ in `process.env.NODE_PATH`
149149
Input objects should be string filenames or objects with these parameters:
150150

151151
* `row.file` - filename
152+
* `row.entry` - whether to treat this file as an entry point, defaults to
153+
`true`. Set to `false` to include this file, but not run it automatically.
152154
* `row.expose` - name to be exposed as
153-
* `row.noparse` when true, don't parse the file contents for dependencies
155+
* `row.noparse` - when true, don't parse the file contents for dependencies
154156
155157
or objects can specify transforms:
156158
157159
* `row.transform` - string name, path, or function
158160
* `row.options` - transform options as an object
159161
* `row.global` - boolean, whether the transform is global
160162
163+
# output objects
164+
165+
Output objects describe files with dependencies. They have these properties:
166+
167+
* `row.id` - an identifier for the file, used in the `row.deps` prperty
168+
* `row.file` - path to the source file
169+
* `row.entry` - true if the file is an entry point
170+
* `row.expose` - name to be exposed as
171+
* `row.source` - source file content as a string
172+
* `row.deps` - object describing dependencies. The keys are strings as used
173+
in `require()` calls in the file, and values are the row IDs (file paths)
174+
of dependencies.
175+
161176
# events
162177
163178
## d.on('transform', function (tr, file) {})

0 commit comments

Comments
 (0)