Skip to content

Commit e24a50f

Browse files
committed
pipe in files example
1 parent 21c639d commit e24a50f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,14 @@ _TIP_: remember to use `withLib` when *not* using import-tree as a module import
333333
```nix
334334
# import-tree.files : [ <list-of-files> ]
335335
336-
((import-tree.withLib lib).initFilter (lib.hasSuffix ".js")).files # => list of all .js files
336+
# paths to give to uglify-js
337+
lib.pipe import-tree [
338+
(i: i.initFilter (lib.hasSuffix ".js")) # look for .js files. ignore nothing.
339+
(i: i.addPath ./out) # under the typescript compiler outDir
340+
(i: i.withLib lib) # set lib since we are not importing modules.
341+
(i: i.files)
342+
]
343+
# => list of all .js files
337344
```
338345

339346
### `import-tree.result`

0 commit comments

Comments
 (0)