Skip to content

Commit

Permalink
fix: update prepublish script
Browse files Browse the repository at this point in the history
  • Loading branch information
sobird committed Feb 18, 2025
1 parent 2617419 commit 83934d0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Continuous Integration

on:
# push:
# branches: [ "master" ]
push:
branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
workflow_dispatch:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
# push:
# branches:
# - master
push:
branches:
- master
workflow_dispatch:

permissions:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"main": "index.js",
"bin": {
"xzai": "./index.ts"
"xzai": "./dist/index.js"
},
"scripts": {
"start": "tsx index.ts",
Expand Down Expand Up @@ -60,4 +60,4 @@
"vitest": "^3.0.5",
"ws": "^8.18.0"
}
}
}
9 changes: 7 additions & 2 deletions scripts/prepublish.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
/* eslint-disable @typescript-eslint/naming-convention */
// scripts/prepublish.js
import fs from 'fs';
import path from 'path';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

import pkg from '../package.json' with { type: 'json' };

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const packageJsonPath = path.join(__dirname, '../package.json');

// 修改 bin 字段
Expand Down

0 comments on commit 83934d0

Please sign in to comment.