From 0e8fc5ad3e349a8546bdbe8a61b25b4e2cfa2459 Mon Sep 17 00:00:00 2001 From: Yaco 0x Date: Thu, 18 Jul 2024 18:55:53 -0300 Subject: [PATCH] build: set up build script --- packages/blocknumber/.gitignore | 1 + packages/blocknumber/package.json | 2 +- packages/blocknumber/src/helloWorld.spec.ts | 6 +++++- packages/blocknumber/src/helloWorld.ts | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 packages/blocknumber/.gitignore create mode 100644 packages/blocknumber/src/helloWorld.ts diff --git a/packages/blocknumber/.gitignore b/packages/blocknumber/.gitignore new file mode 100644 index 0000000..7773828 --- /dev/null +++ b/packages/blocknumber/.gitignore @@ -0,0 +1 @@ +dist/ \ No newline at end of file diff --git a/packages/blocknumber/package.json b/packages/blocknumber/package.json index 49b5377..7df4b85 100644 --- a/packages/blocknumber/package.json +++ b/packages/blocknumber/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.ts", "scripts": { - "build": "tsc", + "build": "tsc -p tsconfig.build.json", "lint": "eslint .", "lint:fix": "pnpm lint --fix", "format": "prettier --check .", diff --git a/packages/blocknumber/src/helloWorld.spec.ts b/packages/blocknumber/src/helloWorld.spec.ts index 7216041..f2cafa8 100644 --- a/packages/blocknumber/src/helloWorld.spec.ts +++ b/packages/blocknumber/src/helloWorld.spec.ts @@ -1,7 +1,11 @@ import { describe, expect, it } from "vitest"; +import foo from "./helloWorld"; + describe("test", () => { it("pass", () => { - expect(1).toBe(1); + const result = foo(); + + expect(result).toBe("bar"); }); }); diff --git a/packages/blocknumber/src/helloWorld.ts b/packages/blocknumber/src/helloWorld.ts new file mode 100644 index 0000000..0838c22 --- /dev/null +++ b/packages/blocknumber/src/helloWorld.ts @@ -0,0 +1,3 @@ +export default function foo() { + return "bar"; +}