Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
shijinn520 committed May 16, 2024
1 parent b73f52b commit 5b017d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: 'https://registry.npmjs.org/'
registry-url: "https://registry.npmjs.org/"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Install Dependencies
run: npm install
- name: Install protobufjs globally
run: npm install -g protobufjs

- name: Build
run: npm run build
Expand Down
4 changes: 2 additions & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fs.mkdirSync('./protos')
const jsFile = './protos/compiled.js'
const tsFile = './protos/compiled.d.ts'
const proto = protoFiles.join(' ')
const jsCommand = `npx pbjs -t static-module -w es6 --keep-case -p ./kritor/protos -o ${jsFile} ${proto}`
const tsCommand = `npx pbts -o ${tsFile} ${jsFile}`
const jsCommand = `pbjs -t static-module -w es6 --keep-case -p ./kritor/protos -o ${jsFile} ${proto}`
const tsCommand = `pbts -o ${tsFile} ${jsFile}`
exec(jsCommand, (error, stdout, stderr) => {
if (error) {
console.error(`编译 .proto 文件时出错:${error.message}`)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kritor-proto",
"version": "0.0.2",
"version": "0.0.3",
"type": "module",
"main": "index.js",
"author": "CalmLexi",
Expand Down

0 comments on commit 5b017d0

Please sign in to comment.