diff --git a/omega-target-chromium-extension/.gitignore b/omega-target-chromium-extension/.gitignore index 6654382..26addc4 100644 --- a/omega-target-chromium-extension/.gitignore +++ b/omega-target-chromium-extension/.gitignore @@ -1,5 +1,6 @@ /index.js /omega_target_*.min.js +/tmp /build /release.zip diff --git a/omega-target-chromium-extension/Gruntfile.coffee b/omega-target-chromium-extension/Gruntfile.coffee index 914195d..6c00819 100644 --- a/omega-target-chromium-extension/Gruntfile.coffee +++ b/omega-target-chromium-extension/Gruntfile.coffee @@ -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)) diff --git a/omega-target-chromium-extension/grunt/aliases.coffee b/omega-target-chromium-extension/grunt/aliases.coffee index 21938ba..c296b37 100644 --- a/omega-target-chromium-extension/grunt/aliases.coffee +++ b/omega-target-chromium-extension/grunt/aliases.coffee @@ -7,4 +7,4 @@ module.exports = 'po2crx' ] test: ['mochaTest'] - release: ['default', 'compress'] + release: ['default', 'chromium-manifest', 'compress'] diff --git a/omega-target-chromium-extension/grunt/compress.coffee b/omega-target-chromium-extension/grunt/compress.coffee index 6792332..7528a4b 100644 --- a/omega-target-chromium-extension/grunt/compress.coffee +++ b/omega-target-chromium-extension/grunt/compress.coffee @@ -3,7 +3,16 @@ module.exports = archive: './release.zip' mode: 'zip' build: - cwd: 'build' - src: ['**'] - expand: true - filter: 'isFile' + files: [ + { + cwd: 'build' + src: ['**', '!manifest.json'] + expand: true + filter: 'isFile' + } + { + cwd: 'tmp/' + src: 'manifest.json' + expand: true + } + ]