Skip to content

Commit

Permalink
Perf: 删除无用引入
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Sep 6, 2024
1 parent 162e44a commit b373904
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/update-version.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import fs from 'fs'
import { dirname, join } from 'path'
import { fileURLToPath } from 'url'
import { join } from 'path'
import { execSync } from 'child_process'

// node build/update-version.js --dev/--prod
Expand Down Expand Up @@ -32,9 +31,9 @@ if (stage !== 'prod') {
}
}
// Get the root directory of the project
const __root = process.cwd()
const initHtmlPath = join(__root, 'layouts/partials/init/index.html')
const packageJsonPath = join(__root, 'package.json')
const __project_root = process.cwd()
const initHtmlPath = join(__project_root, 'layouts/partials/init/index.html')
const packageJsonPath = join(__project_root, 'package.json')
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
const version = packageJson.version
// Get the short hash of the last commit (can not get this commit hash at pre-commit hook)
Expand Down

0 comments on commit b373904

Please sign in to comment.