Skip to content

Latest commit

 

History

History
98 lines (75 loc) · 2.53 KB

README.md

File metadata and controls

98 lines (75 loc) · 2.53 KB

gulp-platform-overrides

NPM version Build Status Windows 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