diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml index 1e83bb0..ed7545a 100644 --- a/.forgejo/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -46,6 +46,9 @@ jobs: # Transpile/Build the package (TypeScript -> JavaScript) - name: Transpile/Build the package (TypeScript -> JavaScript) run: | + # Because Yarn is used locally better to install and use it than have to debug weird inconsistencies + npm install --global yarn + # Install needed dependencies yarn install diff --git a/package.json b/package.json index d03afa3..3ef698c 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,27 @@ "author": "Bridgeman Accessible ", "repository": "https://git.bridgemanaccessible.ca/Bridgeman-Accessible/ba-web-framework.git", "license": "MIT", - "main": "./index.ts", + "type": "module", + "main": "./index.js", + "types": "./index.d.ts", + "exports": { + ".": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "./middlewares": { + "types": "./middlewares/index.d.ts", + "default": "./middlewares/index.js" + }, + "./decorators": { + "types": "./decorators/index.d.ts", + "default": "./decorators/index.js" + }, + "./controllers": { + "types": "./controllers/index.d.ts", + "default": "./controllers/index.js" + } + }, "scripts": { "clean": "rm -rf dist", "build": "tsc",