Gulp plugin useful for generating information about your application build, such as name, version ...
Non-lazy people | Lazy people |
---|---|
npm install --save-dev gulp-about |
npm i -D gulp-about |
var about = require('gulp-about');
var gulp = require('gulp');
gulp.task('about', function () {
return gulp.src('package.json')
.pipe(about())
.pipe(gulp.dest('dist')); // writes dist/about.json
});
The above task will produce the file about.json
in the folder dist
. By default, only the name and the version of the application are written.
Pass options to gulp-about
:
gulp.task('about', function () {
return gulp.src('package.json')
.pipe(about({
keys: ['name', 'version', 'author'], // properties to pick from the source
inject: { // custom properties to inject
buildDate: Date.now()
}
}))
.pipe(gulp.dest('dist'));
});
Type: String | String[]
Default: ['name', 'version']
The properties to keep from the source file.
Type: String
Default: about.json
The name of the destination file.
Type: Number
Default: 2
The number of spaces used for indentation in the destination file.
Type: Object
Default: {}
Object of properties to inject in the output. Useful to extend the output with properties not in the source file.
gulp-about is Copyright (c) 2015 Michael P. Bazos and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.