A Gulp plugin for applying platform-specific manifest values. Simply a Gulp wrapper for platform-overrides.
npm install gulp-platform-overrides
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']);
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.
Please report any issues at platform-overrides.
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
}
}
See CONTRIBUTING.md