From 5a2eca3789e2ed159ebfa21aa1a560d50f2840a1 Mon Sep 17 00:00:00 2001 From: Cheun Marec Date: Wed, 10 Apr 2024 10:35:29 +0900 Subject: [PATCH] build: update package.json for production --- package.json | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c5e5a9c..72ed883 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,21 @@ "name": "@okcontract/graph", "version": "0.1.3", "description": "Directed graph library", - "main": "src/index.ts", + "private": false, + "main": "dist/graph.umd.cjs", + "module": "dist/graph.js", "type": "module", + "exports": { + ".": { + "import": "./dist/graph.js", + "require": "./dist/graph.umd.cjs" + } + }, + "files": [ + "dist/", + "README.md", + "LICENSE" + ], "dependencies": {}, "devDependencies": { "@biomejs/biome": "1.5.3", @@ -15,12 +28,18 @@ }, "scripts": { "build": "vite build", - "test": "vitest run --passWithNoTests --test-timeout=10000" + "test": "vitest run", + "coverage": "vitest run --coverage", + "definitions": "tsc --project tsconfig.build.json", + "prepublishOnly": "npm run check && npm test && npm run build && npm run definitions", + "check": "npx @biomejs/biome check src", + "format": "npx @biomejs/biome format src --write", + "formatReadme": "prettier README.md --prose-wrap always --print-width 78 -w" }, "repository": { "type": "git", - "url": "git+https://github.com/hbbio/lambdascript.git" + "url": "git+https://github.com/okcontract/graph.git" }, "author": "Henri Binsztok", - "license": "UNLICENSED" + "license": "MIT" }