Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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, ...)

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.