Skip to content

Commit

Permalink
Merge pull request #5 from biaov/release/v2.0.4
Browse files Browse the repository at this point in the history
Release/v2.0.4
  • Loading branch information
biaov authored Dec 15, 2023
2 parents eac1abf + edd7aa3 commit 8087eed
Show file tree
Hide file tree
Showing 7 changed files with 644 additions and 382 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist
node_modules
node_modules
.log
989 changes: 625 additions & 364 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mine-auto-cli",
"private": false,
"version": "2.0.3",
"version": "2.0.4",
"exports": "./dist/index.js",
"main": "./dist/index.js",
"type": "module",
Expand All @@ -25,7 +25,7 @@
"registry": "https://registry.npmjs.org/"
},
"engines": {
"node": ">=16"
"node": ">=20"
},
"keywords": [
"auto",
Expand All @@ -50,16 +50,16 @@
],
"dependencies": {
"chalk": "^5.3.0",
"commander": "^11.0.0",
"log-symbols": "^5.1.0",
"commander": "^11.1.0",
"log-symbols": "^6.0.0",
"ora": "^7.0.1",
"update-notifier": "^6.0.2"
"update-notifier": "^7.0.0"
},
"devDependencies": {
"@types/node": "^20.8.4",
"@types/update-notifier": "^6.0.5",
"prettier": "^3.0.3",
"typescript": "^5.2.2",
"vite": "^4.4.11"
"@types/node": "^20.10.4",
"@types/update-notifier": "^6.0.8",
"prettier": "^3.1.1",
"typescript": "^5.3.3",
"vite": "^5.0.9"
}
}
3 changes: 1 addition & 2 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { rewritePackage, copyAssets } from './hooks.js'

!(async () => {
try {
await rewritePackage()
await copyAssets()
await Promise.all([rewritePackage(), copyAssets()])
} catch (e) {
console.log(e)
process.exit(1)
Expand Down
6 changes: 2 additions & 4 deletions scripts/hooks.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { writeFileSync, copyFileSync, existsSync, readdirSync, mkdirSync, readFileSync, statSync, unlinkSync } from 'fs'
import { writeFileSync, copyFileSync, existsSync, readdirSync, mkdirSync, statSync, unlinkSync } from 'fs'
import { join } from 'path'
import { resetPath } from './path.js'

const pkg = JSON.parse(readFileSync(resetPath('@/package.json')))
const packageJson = pkg
import packageJson from '../package.json' assert { type: 'json' }

/**
* 重写 package.json
Expand Down
3 changes: 3 additions & 0 deletions scripts/path.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { resolve, dirname } from 'path'
import { fileURLToPath } from 'url'

/**
* 相对目录
*/
export const __dirname = dirname(fileURLToPath(import.meta.url))

/**
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"@/*": ["./src/*"]
}
},
"include": ["src/**/*.ts", "scripts/*.js"],
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "dist", ".git"]
}

0 comments on commit 8087eed

Please sign in to comment.