Remove downloads permission from archive (unneeded for Chromium).

This commit is contained in:
FelisCatus 2017-08-02 22:57:44 -04:00
parent 9978279d00
commit 1e06ede549
4 changed files with 20 additions and 5 deletions

View File

@ -1,5 +1,6 @@
/index.js
/omega_target_*.min.js
/tmp
/build
/release.zip

View File

@ -1,3 +1,8 @@
module.exports = (grunt) ->
require('load-grunt-config')(grunt)
require('./grunt-po2crx')(grunt)
grunt.registerTask 'chromium-manifest', ->
manifest = grunt.file.readJSON('overlay/manifest.json')
manifest.permissions = manifest.permissions.filter (p) -> p != 'downloads'
grunt.file.write('tmp/manifest.json', JSON.stringify(manifest))

View File

@ -7,4 +7,4 @@ module.exports =
'po2crx'
]
test: ['mochaTest']
release: ['default', 'compress']
release: ['default', 'chromium-manifest', 'compress']

View File

@ -3,7 +3,16 @@ module.exports =
archive: './release.zip'
mode: 'zip'
build:
files: [
{
cwd: 'build'
src: ['**']
src: ['**', '!manifest.json']
expand: true
filter: 'isFile'
}
{
cwd: 'tmp/'
src: 'manifest.json'
expand: true
}
]