diff --git a/package.json b/package.json index fdfb088..94bb125 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ "private": true, "scripts": { "start": "webpack --watch", - "dev": "webpack", "stamp": "node scripts/version.js", - "prod": "NODE_ENV=production webpack && cd dist && rm -f ./gitako.zip && zip gitako.zip -r *" + "postversion": "npm run stamp && git add src/manifest.json && git commit --amend --no-edit", + "prod": "npm run stamp && NODE_ENV=production webpack && cd dist && rm -f ./gitako.zip && zip gitako.zip -r *" }, "dependencies": { "nprogress": "^0.2.0", diff --git a/scripts/version.js b/scripts/version.js index d9d847c..3aa7456 100644 --- a/scripts/version.js +++ b/scripts/version.js @@ -3,8 +3,8 @@ const path = require('path') const rootPath = path.resolve(__dirname, '../') const packageJSON = require(path.resolve(rootPath, 'package.json')) -const manifestPath = path.resolve(rootPath, 'src/manifest.json'); +const manifestPath = path.resolve(rootPath, 'src/manifest.json') const manifest = require(manifestPath) manifest.version = packageJSON.version -fs.writeFileSync(manifestPath, JSON.stringify(manifest), 'utf-8') +fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, ' '), 'utf-8') diff --git a/src/manifest.json b/src/manifest.json index 068d527..6cd153e 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1 +1,26 @@ -{"manifest_version":2,"name":"Gitako","version":"0.3.0","author":"EnixCoda","icons":{"128":"icons/Gitako-128x128.png"},"description":"yet another GitHub extension, inspired by Octotree and GayHub.","homepage_url":"https://github.com/EnixCoda/Gitako","permissions":["tabs","storage","*://github.com/*"],"content_scripts":[{"matches":["https://github.com/*"],"js":["content.js"]}]} \ No newline at end of file +{ + "manifest_version": 2, + "name": "Gitako", + "version": "0.3.0", + "author": "EnixCoda", + "icons": { + "128": "icons/Gitako-128x128.png" + }, + "description": "yet another GitHub extension, inspired by Octotree and GayHub.", + "homepage_url": "https://github.com/EnixCoda/Gitako", + "permissions": [ + "tabs", + "storage", + "*://github.com/*" + ], + "content_scripts": [ + { + "matches": [ + "https://github.com/*" + ], + "js": [ + "content.js" + ] + } + ] +} \ No newline at end of file