gulp-platform-overrides

1.0.0 • Public • Published

gulp-platform-overrides NPM version Build Status Dependency Status

A Gulp plugin for applying platform-specific manifest values. Simply a Gulp wrapper for platform-overrides.

Installation

npm install gulp-platform-overrides

Usage

var gulp = require('gulp');
var platformOverrides = require('gulp-platform-overrides');
 
gulp.task('prepare', function() {
    gulp.src('./package.json')
        .pipe(platformOverrides({platform: 'osx'}) // if platform is missing, then it is auto-detected
        .pipe(gulp.dest('./dist'));
});
 
gulp.task('default', ['prepare']);

Options

The options are the same as platform-overrides, except the options property (the manifest) isn't supported as it is passed down the stream here.

Issues

Please report any issues at platform-overrides.

Example

Example manifest:

{
  "name": "nw-demo",
  "version": "0.1.0",
  "main": "index.html",
  "window": {
      "frame": false,
      "toolbar": false
  },
  "platformOverrides": {
      "win": {
          "window": {
              "frame": true
          }
      },
      "osx": {
          ...
      },
      "linux32": {
          ...
      },
      "linux64": {
          ...
      },
  }
}

For example, when building for Windows, the manifest generated and put into the end app (from the manifest above) would be:

{
    "name": "nw-demo",
    "version": "0.1.0",
    "main": "index.html",
    "window": {
        "frame": true,
        "toolbar": false
    }
}

Contributing

See CONTRIBUTING.md

Dependencies (4)

Dev Dependencies (7)

Package Sidebar

Install

npm i gulp-platform-overrides

Weekly Downloads

5

Version

1.0.0

License

MIT

Last publish

Collaborators

  • adam-lynch