Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelbazos/gulp-about
Gulp plugin for producing a json describing your application (name, version, buildDate, ...)
https://github.com/michaelbazos/gulp-about
Last synced: 23 days ago
JSON representation
Gulp plugin for producing a json describing your application (name, version, buildDate, ...)
- Host: GitHub
- URL: https://github.com/michaelbazos/gulp-about
- Owner: michaelbazos
- License: mit
- Created: 2015-12-20T18:38:09.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-20T00:12:26.000Z (almost 9 years ago)
- Last Synced: 2024-10-09T18:57:09.406Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-about [![Build Status](https://travis-ci.org/michaelbazos/gulp-about.svg?branch=master)](https://travis-ci.org/michaelbazos/gulp-about)
Gulp plugin useful for generating information about your application build, such as name, version ...
# Installation
Non-lazy people | Lazy people
--------------- | -----------
`npm install --save-dev gulp-about` | `npm i -D gulp-about`# Usage
## `gulpfile.js`
```js
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.
# Options
Pass options to `gulp-about`:
```js
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'));
});
```### keys
Type: `String | String[]`
Default: `['name', 'version']`The properties to keep from the source file.
### fileName
Type: `String`
Default: `about.json`The name of the destination file.
### indent
Type: `Number`
Default: `2`The number of spaces used for indentation in the destination file.
### inject
Type: `Object`
Default: `{}`Object of properties to inject in the output. Useful to extend the output with properties not in the source file.
# License
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.