# gulp-cordova-version

> Sets the version in the config.xml of the cordova project.

Latest version **0.3.0** (published 2015-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-cordova-version
pnpm add gulp-cordova-version
yarn add gulp-cordova-version
bun add gulp-cordova-version
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2015-09-06 |
| First published | 2015-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Sam Verschueren |
| Maintainers | samverschueren |
| Keywords | gulp, gulpjs, cordova, version, config |

## Links

- npm: https://www.npmjs.com/package/gulp-cordova-version
- Repository: https://github.com/SamVerschueren/gulp-cordova-version
- Issues: https://github.com/SamVerschueren/gulp-cordova-version/issues
- npm.io page: https://npm.io/package/gulp-cordova-version

## Dependencies (3)

- [through2](https://npm.io/package/through2.md) ^0.6.5
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.4
- [cordova-config](https://npm.io/package/cordova-config.md) ^0.6.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2015-09-06
- 0.2.0 — 2015-08-07
- 0.0.1 — 2015-05-24

## README

# gulp-cordova-version

[![Build Status](https://travis-ci.org/SamVerschueren/gulp-cordova-version.svg?branch=master)](https://travis-ci.org/SamVerschueren/gulp-cordova-version)
[![Coverage Status](https://coveralls.io/repos/SamVerschueren/gulp-cordova-version/badge.svg?branch=master&service=github)](https://coveralls.io/github/SamVerschueren/gulp-cordova-version?branch=master)

> Sets the version in the config.xml of the cordova project.

## Installation

```bash
npm install --save-dev gulp-cordova-version
```

## Usage

```javascript
var gulp = require('gulp'),
    create = require('gulp-cordova-create'),
    version = require('gulp-cordova-version');

gulp.task('build', function() {
    return gulp.src('dist')
        .pipe(create())
        .pipe(version('2.3.1'));
});
```

This will set the version attribute in the `config.xml` file.

> Tip: You can use the version of your `package.json` file and call the plugin with `version(require('./package.json').version)`.

It is also possible to pass in a second object to set the `android-versionCode` and `ios-CFBundleVersion` in your `config.xml` file.

```javascript
gulp.task('build', function() {
    return gulp.src('dist')
        .pipe(create())
        .pipe(version('2.3.1', {androidVersionCode: 231, iosBundleVersion: '2.3.1'}));
});
```

## API

### version(version, [versionCodes])

#### version

*Required*
Type: `string`

The version of the application in the format `x.y.z`.

#### versionCodes

Type: `object`

Object with two optional properties to set specific platform version codes. To set the version code for android, use the `androidVersionCode`
property. To set the CFBundleVersion in iOS, use the `iosBundleVersion` property.

## Related

See [`gulp-cordova`](https://github.com/SamVerschueren/gulp-cordova) for the full list of available packages.

## Contributors

- Sam Verschueren [<sam.verschueren@gmail.com>]

## License

MIT © Sam Verschueren

---
_Source: https://npm.io/package/gulp-cordova-version · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
