Ensure Opera build excludes chromereload file

Fixes #2504
This commit is contained in:
Dan Finlay 2017-11-21 15:19:10 -08:00
parent 408bbe726f
commit 4a42c816c2
1 changed files with 7 additions and 1 deletions

View File

@ -120,11 +120,17 @@ gulp.task('manifest:production', function() {
'./dist/firefox/manifest.json',
'./dist/chrome/manifest.json',
'./dist/edge/manifest.json',
'./dist/opera/manifest.json',
],{base: './dist/'})
// Exclude chromereload script in production:
.pipe(gulpif(!debug,jsoneditor(function(json) {
json.background.scripts = ["scripts/background.js"]
json.background.scripts = json.background.scripts.filter((script) => {
return !script.includes('chromereload')
})
return json
})))
.pipe(gulp.dest('./dist/', { overwrite: true }))
})