diff --git a/package-lock.json b/package-lock.json index ab426f9..f3f66a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "@stanfordbdhg/example-package": "file:../packages/example-package", + "@stanfordbdhg/example-package": "file:./packages/example-package", "next": "^14", "prettier-plugin-tailwindcss": "^0.5.14", "react": "^18", @@ -23,14 +23,14 @@ "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", - "@typescript-eslint/eslint-plugin": "^7.11.0", - "@typescript-eslint/parser": "^7.11.0", + "@typescript-eslint/eslint-plugin": "^7", + "@typescript-eslint/parser": "^7", "autoprefixer": "^10", "concurrently": "^8", "eslint": "^8", "eslint-config-next": "^14", "eslint-config-prettier": "^9", - "eslint-plugin-import": "^2.29.1", + "eslint-plugin-import": "^2", "eslint-plugin-prettier": "^5", "jest": "^29", "jest-environment-jsdom": "^29", @@ -42,7 +42,9 @@ "typescript": "^5" } }, - "../packages/example-package": {}, + "../packages/example-package": { + "extraneous": true + }, "node_modules/@adobe/css-tools": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz", @@ -2179,7 +2181,7 @@ } }, "node_modules/@stanfordbdhg/example-package": { - "resolved": "../packages/example-package", + "resolved": "packages/example-package", "link": true }, "node_modules/@swc/counter": { @@ -11236,6 +11238,9 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "packages/example-package": { + "version": "0.1.0" } } } diff --git a/package.json b/package.json index 73feac3..0e11109 100644 --- a/package.json +++ b/package.json @@ -15,19 +15,18 @@ "scripts": { "dev": "concurrently \"next dev\" \"npm --prefix packages/example-package run watch\"", "prebuild": "npm --prefix packages/example-package run build", - "buildTypes": "npm --prefix packages/example-package run buildTypes", "build": "next build", "start": "next start", "lint": "eslint .", "lint:fix": "eslint . --fix & prettier --write .", - "lint:ci": "npm run buildTypes && eslint --output-file eslint_report.json --format json .", + "lint:ci": "npm run prebuild && eslint --output-file eslint_report.json --format json .", "pretest": "npm --prefix packages/example-package run build", "test": "jest", "docs": "typedoc", "docs:ci": "typedoc --out ./out/docs --githubPages true" }, "dependencies": { - "@stanfordbdhg/example-package": "file:../packages/example-package", + "@stanfordbdhg/example-package": "file:./packages/example-package", "next": "^14", "prettier-plugin-tailwindcss": "^0.5.14", "react": "^18", diff --git a/packages/example-package/.gitignore b/packages/example-package/.gitignore index b23dada..2f7ba05 100644 --- a/packages/example-package/.gitignore +++ b/packages/example-package/.gitignore @@ -6,4 +6,5 @@ # SPDX-License-Identifier: MIT # -dist \ No newline at end of file +dist +node_modules diff --git a/packages/example-package/package.json b/packages/example-package/package.json index 39b2f0c..b65a5a4 100644 --- a/packages/example-package/package.json +++ b/packages/example-package/package.json @@ -2,10 +2,12 @@ "name": "@stanfordbdhg/example-package", "version": "0.1.0", "private": true, - "main": "dist/index.js", "scripts": { "build": "tsc", - "buildTypes": "tsc --emitDeclarationOnly", "watch": "tsc -w" + }, + "types": "dist/index.d.ts", + "exports": { + ".": "./dist/index.js" } } diff --git a/packages/example-package/tsconfig.json b/packages/example-package/tsconfig.json index 7f1ed38..1d19b72 100644 --- a/packages/example-package/tsconfig.json +++ b/packages/example-package/tsconfig.json @@ -1,12 +1,19 @@ { + "include": ["src"], "compilerOptions": { - "composite": true, + "declaration": true, + "declarationMap": true, + "module": "commonjs", + "target": "es6", + "lib": ["esnext"], + "jsx": "preserve", "rootDir": "src", "outDir": "dist", - "declaration": true, - "declarationMap": true + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true }, - "include": ["src"], "typedocOptions": { "includeVersion": true, "entryPoints": ["src/index.ts"] diff --git a/tsconfig.json b/tsconfig.json index 120a09c..7f4d743 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,9 +19,6 @@ "name": "next" } ], - "paths": { - "@stanfordbdhg/example-package": ["./packages/example-package/dist"] - } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"],