Skip to content

Commit c13772d

Browse files
committed
Meta: create single manifest file
1 parent c2e6422 commit c13772d

File tree

3 files changed

+11
-63
lines changed

3 files changed

+11
-63
lines changed

Gruntfile.js

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ module.exports = function(grunt) {
3737
src: ["*", "images/*"],
3838
dest: "",
3939
filter: "isFile"
40-
}, {
41-
expand : true,
42-
cwd: "src/chrome",
43-
src: ["*"],
44-
dest: "",
45-
filter: "isFile"
4640
}]
4741
},
4842
firefox: {
@@ -56,12 +50,6 @@ module.exports = function(grunt) {
5650
src: ["*", "images/*"],
5751
dest: "",
5852
filter: "isFile"
59-
}, {
60-
expand : true,
61-
cwd: "src/firefox",
62-
src: ["*"],
63-
dest: "",
64-
filter: "isFile"
6553
}]
6654
}
6755

@@ -75,18 +63,14 @@ module.exports = function(grunt) {
7563

7664
// update chrome & firefox manifest.json file version numbers to match the package.json version
7765
grunt.registerTask("updateManifest", () => {
78-
let indx, file,
79-
manifests = ["src/chrome/manifest.json", "src/firefox/manifest.json"],
80-
len = manifests.length;
81-
for ( indx = 0; indx < len; indx++ ) {
82-
if (!grunt.file.exists(manifests[indx])) {
83-
grunt.log.error("file " + manifests[indx] + " not found");
84-
return true; // return false to abort the execution
85-
}
86-
file = grunt.file.readJSON(manifests[indx]);
87-
file.version = pkg.version;
88-
grunt.file.write(manifests[indx], JSON.stringify(file, null, 2)); // serialize it back to file
66+
let file;
67+
if (!grunt.file.exists("src/manifest.json")) {
68+
grunt.log.error("src/manifest.json file not found");
69+
return true; // return false to abort the execution
8970
}
71+
file = grunt.file.readJSON("src/manifest.json");
72+
file.version = pkg.version;
73+
grunt.file.write("src/manifest.json", JSON.stringify(file, null, 2)); // serialize it back to file
9074
});
9175

9276
grunt.registerTask("default", [

src/firefox/manifest.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/chrome/manifest.json renamed to src/manifest.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@
2828
"48": "images/icon48.png",
2929
"128": "images/icon128.png"
3030
},
31-
"options_page": "options.html"
31+
"options_ui": {
32+
"page": "options.html",
33+
"chrome_style": true
34+
}
3235
}

0 commit comments

Comments
 (0)