gulp-count-stat
v1.0.0
Published
gulp plugin to show countings on words or characters of files
Downloads
66
Maintainers
Readme
gulp-count-stat
gulp plugin to show countings on words or characters of files
Install
npm install --save-dev gulp-count-stat
Usage
var gulp = require("gulp");
var countStat = require("gulp-count-stat");
gulp.task("stat", function () {
return gulp.src("chapter-*/**/*.txt")
.pipe(countStat());
});
gulp.task("total", function () {
return gulp.src("chapter-*/**/*.txt")
.pipe(countStat({ showFile: false, showDir: false }));
});
NOTICE: Make sure return
is in your gulp task. Otherwise you will get no output.
countStat(options = {})
options
| Key | Type | Description | Default |
| --- | ---- | ----------- | ------- |
| words
| Boolean | If false
, omits countings of words from output | true
|
| chars
| Boolean | If false
, omits countings of characters from output | true
|
| showFile
| Boolean | If false
, omits countings on files from output | true
|
| showDir
| Boolean | If false
, omits countings on directories from output | true
|
| showTotal
| Boolean | If false
, omits total countings from output | true
|
| tree
| Boolean | If false
, show countings in simple list (not tree) | true
|
Testing
npm test
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
MIT (See LICENSE)