Skip to content

Commit

Permalink
Fix main file and file addressing in node pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
insyri committed Aug 10, 2022
1 parent 0b4bce9 commit ffcf187
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
9 changes: 9 additions & 0 deletions node-transform.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,12 @@ Set-Location "$Destination"

npm install
npm run build

Copy-Item -Recurse "src/types" "lib"

"mod.d.ts", "mod.js" | ForEach-Object {
$K = "$(Get-Content "$_" -Raw)" -replace "src", "lib"
"$K" > "$_"
}

Set-Location ".."
9 changes: 4 additions & 5 deletions node/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "tpy",
"version": "1.0.0-pre-release-2",
"version": "1.0.0-pre-release-3",
"description": "🔑 A strongly typed Pylon API client.",
"license": "MIT",
"type": "commonjs",
"main": "lib/mod.js",
"types": "lib/mod.d.ts",
"main": "mod.js",
"types": "mod.d.ts",
"files": [
"lib",
"LICENSE",
Expand All @@ -15,8 +15,7 @@
"mod.d.ts"
],
"scripts": {
"build": "tsc && tsc ./mod.ts --outdir . -d",
"postbuild": "cp -r ./src/types/ ./lib/"
"build": "tsc && tsc ./mod.ts --outdir . -d"
},
"keywords": [
"pylon",
Expand Down

0 comments on commit ffcf187

Please sign in to comment.