Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

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

install

npm i gulp-platform-overrides

Downloadsweekly downloads

10

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability