Skip to content

Commit

Permalink
build: create cjs and esm files and correct types path
Browse files Browse the repository at this point in the history
  • Loading branch information
skrtheboss committed Feb 20, 2024
1 parent a13be8c commit 01346a4
Show file tree
Hide file tree
Showing 4 changed files with 1,105 additions and 8 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-async-semaphore",
"version": "3.0.4",
"version": "4.0.0",
"license": "MIT",
"scripts": {
"format": "nx format:write",
Expand All @@ -27,6 +27,7 @@
"@nx/jest": "17.0.2",
"@nx/js": "17.0.2",
"@nx/plugin": "17.0.2",
"@nx/rollup": "17.0.2",
"@nx/workspace": "17.0.2",
"@swc-node/register": "1.6.8",
"@swc/cli": "0.1.62",
Expand Down
7 changes: 3 additions & 4 deletions packages/ts-async-semaphore/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"name": "ts-async-semaphore",
"version": "3.0.4",
"version": "4.0.0",
"description": "A counting semaphore for node based on Java's Sempahore.",
"main": "dist/semaphore.js",
"types": "dist/semaphore.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/skrtheboss/ts-async-semaphore.git"
Expand Down Expand Up @@ -36,5 +34,6 @@
},
"dependencies": {
"tslib": "2.6.2"
}
},
"types": "./src/semaphore.d.ts"
}
13 changes: 10 additions & 3 deletions packages/ts-async-semaphore/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"executor": "@nx/rollup:rollup",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/ts-async-semaphore",
"main": "packages/ts-async-semaphore/src/index.ts",
"project": "packages/ts-async-semaphore/package.json",
"main": "packages/ts-async-semaphore/src/semaphore.ts",
"tsConfig": "packages/ts-async-semaphore/tsconfig.lib.json",
"assets": ["packages/ts-async-semaphore/*.md", "LICENSE"]
"format": ["esm", "cjs"],
"compiler": "tsc",
"assets": [
{ "input": "./packages/ts-async-semaphore", "glob": "*.md", "output": "./" },
{ "input": "./", "glob": "LICENSE", "output": "./" }
],
"generateExportsField": true
}
},
"lint": {
Expand Down
Loading

0 comments on commit 01346a4

Please sign in to comment.