diff --git a/README.md b/README.md index 2b564a1..760a8aa 100644 --- a/README.md +++ b/README.md @@ -72,13 +72,14 @@ Bun versions >= 1.x are supported. ``` ## Example ```js +// adapt import to the targeted JS runtime import { baseline, bench, clear, group, run } from 'tatami-ng'; bench('noop', () => {}); diff --git a/jsr.json b/jsr.json index 7ddf7a0..f748b5c 100644 --- a/jsr.json +++ b/jsr.json @@ -2,14 +2,14 @@ "$schema": "https://jsr.io/schema/config-file.v1.json", "name": "@poolifier/tatami-ng", "version": "0.3.4", - "exports": "./src/cli.mjs", + "exports": "./src/index.mjs", "publish": { "include": [ "LICENSE", "README.md", "jsr.json", "src/**/*.mjs", - "src/**/*.ts" + "src/**/*.d.ts" ] } } diff --git a/package.json b/package.json index bad6aba..054a630 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,13 @@ "license": "MIT", "version": "0.3.4", "packageManager": "bun@1.1.3", - "types": "./src/cli.d.ts", - "main": "./src/cli.mjs", - "browser": "./src/cli.mjs", + "types": "./src/index.d.ts", + "main": "./src/index.mjs", + "browser": "./src/index.mjs", "exports": { - "types": "./src/cli.d.ts", - "import": "./src/cli.mjs", - "browser": "./src/cli.cjs" + "types": "./src/index.d.ts", + "import": "./src/index.mjs", + "browser": "./src/index.mjs" }, "description": "cross javascript runtime benchmarking library", "homepage": "https://github.com/poolifier/tatami-ng#readme", diff --git a/src/cli.d.ts b/src/index.d.ts similarity index 100% rename from src/cli.d.ts rename to src/index.d.ts diff --git a/src/cli.mjs b/src/index.mjs similarity index 100% rename from src/cli.mjs rename to src/index.mjs diff --git a/tests/formatting.js b/tests/formatting.js index e1a38db..4504bec 100644 --- a/tests/formatting.js +++ b/tests/formatting.js @@ -1,4 +1,4 @@ -import { bench, group, run } from '../src/cli.mjs'; +import { bench, group, run } from '../src/index.mjs'; group({ summary: true }, () => { bench('noop', () => {}); diff --git a/tests/gif.js b/tests/gif.js index 0301457..9451ff5 100644 --- a/tests/gif.js +++ b/tests/gif.js @@ -1,4 +1,4 @@ -import { baseline, bench, group, run } from '../src/cli.mjs'; +import { baseline, bench, group, run } from '../src/index.mjs'; group(() => { bench('noop()', () => {}); diff --git a/tests/test.js b/tests/test.js index d8fdef1..c8dd7c8 100644 --- a/tests/test.js +++ b/tests/test.js @@ -1,4 +1,4 @@ -import { baseline, bench, clear, group, run } from '../src/cli.mjs'; +import { baseline, bench, clear, group, run } from '../src/index.mjs'; bench('noop', () => {}, { before: () => {}, diff --git a/tests/test.ts b/tests/test.ts index d8fdef1..c8dd7c8 100644 --- a/tests/test.ts +++ b/tests/test.ts @@ -1,4 +1,4 @@ -import { baseline, bench, clear, group, run } from '../src/cli.mjs'; +import { baseline, bench, clear, group, run } from '../src/index.mjs'; bench('noop', () => {}, { before: () => {},