Skip to content

Commit

Permalink
chore(npm): Also export as default
Browse files Browse the repository at this point in the history
  • Loading branch information
JumpLink committed Mar 1, 2024
1 parent 4df45df commit 12f2112
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 9 deletions.
4 changes: 4 additions & 0 deletions examples/gjs/gtk-4-custom-widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@
"@ts-for-gir/cli": "workspace:^",
"esbuild": "^0.20.1",
"typescript": "^5.2.2"
},
"dependencies": {
"@girs/gjs": "workspace:^",
"@girs/gtk-4.0": "workspace:^"
}
}
4 changes: 4 additions & 0 deletions examples/gjs/gtk-4-list-store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@
"devDependencies": {
"esbuild": "^0.20.1",
"typescript": "^5.2.2"
},
"dependencies": {
"@girs/gjs": "workspace:^",
"@girs/gtk-4.0": "workspace:^"
}
}
2 changes: 2 additions & 0 deletions examples/gjs/soup-3-websocket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"typescript": "^5.2.2"
},
"dependencies": {
"@girs/gio-2.0": "workspace:^",
"@girs/gjs": "workspace:^",
"@girs/soup-3.0": "workspace:^"
}
}
24 changes: 16 additions & 8 deletions packages/generator-typescript/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,45 @@ _%>
<%_ if (packageName === 'Gjs') { _%>
"./ambient": {
"types": "./ambient.d.ts",
"import": "./ambient.js"
"import": "./ambient.js",
"default": "./ambient.js"
},
"./dom": {
"types": "./dom.d.ts",
"import": "./dom.js"
"import": "./dom.js",
"default": "./dom.js"
},
"./gettext": {
"types": "./gettext.d.ts",
"import": "./gettext.js"
"import": "./gettext.js",
"default": "./gettext.js"
},
"./system": {
"types": "./system.d.ts",
"import": "./system.js"
"import": "./system.js",
"default": "./system.js"
},
"./cairo": {
"types": "./cairo.d.ts",
"import": "./cairo.js"
"import": "./cairo.js",
"default": "./cairo.js"
},
<%_ } else {_%>
"./ambient": {
"types": "./<%- entryPointName %>-ambient.d.ts",
"import": "./<%- entryPointName %>-ambient.js"
"import": "./<%- entryPointName %>-ambient.js",
"default": "./<%- entryPointName %>-ambient.js"
},
"./import": {
"types": "./<%- entryPointName %>-import.d.ts",
"import": "./<%- entryPointName %>-import.js"
"import": "./<%- entryPointName %>-import.js",
"default": "./<%- entryPointName %>-import.js"
},
<%_ } _%>
".": {
"types": "./<%- entryPointName %>.d.ts",
"import": "./<%- entryPointName %>.js"
"import": "./<%- entryPointName %>.js",
"default": "./<%- entryPointName %>.js"
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion types
Submodule types updated 423 files
6 changes: 6 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8164,6 +8164,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@ts-for-gir-example/gjs-gtk-4-custom-widget-example@workspace:examples/gjs/gtk-4-custom-widget"
dependencies:
"@girs/gjs": "workspace:^"
"@girs/gtk-4.0": "workspace:^"
"@ts-for-gir/cli": "workspace:^"
esbuild: "npm:^0.20.1"
typescript: "npm:^5.2.2"
Expand Down Expand Up @@ -8319,6 +8321,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@ts-for-gir-example/gtk-4-list-store-example@workspace:examples/gjs/gtk-4-list-store"
dependencies:
"@girs/gjs": "workspace:^"
"@girs/gtk-4.0": "workspace:^"
esbuild: "npm:^0.20.1"
typescript: "npm:^5.2.2"
languageName: unknown
Expand Down Expand Up @@ -8360,6 +8364,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@ts-for-gir-example/soup-3-websocket-example@workspace:examples/gjs/soup-3-websocket"
dependencies:
"@girs/gio-2.0": "workspace:^"
"@girs/gjs": "workspace:^"
"@girs/soup-3.0": "workspace:^"
esbuild: "npm:^0.20.1"
typescript: "npm:^5.2.2"
Expand Down

0 comments on commit 12f2112

Please sign in to comment.