mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
feat: script for sync manifest version
This commit is contained in:
parent
5c1e714b18
commit
eaa4c94e53
3 changed files with 13 additions and 1 deletions
|
|
@ -3,7 +3,8 @@
|
|||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"es6": true
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
"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 *"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
10
scripts/version.js
Normal file
10
scripts/version.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
const fs = require('fs')
|
||||
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 manifest = require(manifestPath)
|
||||
|
||||
manifest.version = packageJSON.version
|
||||
fs.writeFileSync(manifestPath, JSON.stringify(manifest), 'utf-8')
|
||||
Loading…
Reference in a new issue