Skip to content

Commit

Permalink
feat: prepare for environment
Browse files Browse the repository at this point in the history
Signed-off-by: Aiden <[email protected]>
  • Loading branch information
aiden271828 committed Nov 28, 2023
1 parent 4c46521 commit 88a3cf4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/npm_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
with:
node-version: latest
- run: npm install
- run: npm install @rollup/rollup-linux-x64-gnu
- run: npm run build
- name: setup opengemini
uses: shoothzj/setup-opengemini-action@main
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"description": "A TypeScript-based OpenGemini client library for Node.js and the browser.",
"scripts": {
"prepare": "husky install",
"prepare": "node prepare.mjs",
"test": "jest --coverage",
"lint": "eslint . --ext js,.ts && prettier . --check",
"fix": "eslint . --ext js,.ts --fix && prettier . --write",
Expand Down Expand Up @@ -46,7 +46,7 @@
"homepage": "https://github.com/openGemini/opengemini-client-ts#readme",
"lint-staged": {
"**/*": "prettier --write --ignore-unknown",
"*.{js,ts}": "eslint --fix"
"*.{js,mjs,ts}": "eslint --fix"
},
"jest": {
"setupFilesAfterEnv": [
Expand Down
9 changes: 9 additions & 0 deletions prepare.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { exec } from "child_process";

exec("husky install");

if (process.platform === "linux") {
exec("npm install @rollup/[email protected] --no-save");
} else if (process.platform === "darwin") {
exec("npm install @rollup/[email protected] --no-save");
}
3 changes: 3 additions & 0 deletions src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test("index.ts", () => {
expect("index.ts").toBeTruthy();
});

0 comments on commit 88a3cf4

Please sign in to comment.