mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 06:46:13 +03:00
chore: Add version.txt in build (#1395)
This commit is contained in:
parent
69398e02a5
commit
2959461409
2 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
"start": "vite",
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc && vite build",
|
||||
"postbuild": "node write-version.cjs",
|
||||
"check-build": "vue-tsc",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint --fix --ignore-path .gitignore && prettier . -w -u --ignore-path .gitignore",
|
||||
|
|
8
write-version.cjs
Normal file
8
write-version.cjs
Normal file
|
@ -0,0 +1,8 @@
|
|||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const packageJson = require('./package.json')
|
||||
const version = packageJson.version
|
||||
|
||||
const filePath = path.join(__dirname, 'vuetorrent', 'version.txt')
|
||||
fs.writeFileSync(filePath, version)
|
Loading…
Reference in a new issue