Skip to content

Commit

Permalink
README: link to test spec files, tiny formatting fixes (#83)
Browse files Browse the repository at this point in the history
* README: link to test spec files, tiny formatting fixes

* Update README.md
  • Loading branch information
tommcc authored and yocontra committed Dec 4, 2019
1 parent 056b298 commit 50dee19
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ gulp.src("./src/main/text/hello.txt", { base: process.cwd() })
.pipe(gulp.dest("./dist")); // ./dist/main/text/ciao/bonjour-aloha-hola.md
```

**See test/rename.spec.js for more examples and test/path-parsing.spec.js for hairy details.**
**See [test/rename.spec.js](test/rename.spec.js) for more examples and [test/path-parsing.spec.js](test/path-parsing.spec.js) for hairy details.**

## Notes

* `dirname` is the relative path from the base directory set by `gulp.src` to the filename.
* `gulp.src()` uses glob-stream which sets the base to the parent of the first directory glob (`*`, `**`, [], or extglob). `dirname` is the remaining directories or `./` if none. glob-stream versions >= 3.1.0 (used by gulp >= 3.2.2) accept a `base` option, which can be used to explicitly set the base.
* `gulp.dest()` renames the directories between `process.cwd()` and `dirname` (i.e. the base relative to CWD). Use `dirname` to rename the directories matched by the glob or descendents of the base of option.
* `basename` is the filename without the extension like path.basename(filename, path.extname(filename)).
* `extname` is the file extension including the '.' like path.extname(filename).
* when using a function, a second `file` argument is provided with the whole context and original file value
* when using a function, if no `Object` is returned then the passed parameter object (along with any modifications) is re-used
* `basename` is the filename without the extension like `path.basename(filename, path.extname(filename))`.
* `extname` is the file extension including the `.` like `path.extname(filename)`.
* when using a function, a second `file` argument is provided with the whole context and original file value.
* when using a function, if no `Object` is returned then the passed parameter object (along with any modifications) is re-used.

## License

Expand Down

0 comments on commit 50dee19

Please sign in to comment.