@gjsify/esbuild-plugin-gjsify 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/dist/esm/index.mjs +577 -6223
- package/dist/shims/console-gjs.js +51 -0
- package/dist/types/app/index.d.ts +0 -1
- package/dist/types/types/app.d.ts +1 -1
- package/dist/types/types/plugin-options.d.ts +7 -0
- package/dist/types/utils/alias.d.ts +0 -3
- package/dist/types/utils/entry-points.d.ts +1 -1
- package/dist/types/utils/extension.d.ts +1 -8
- package/dist/types/utils/merge.d.ts +2 -0
- package/dist/types/utils/patch-to-common-js.d.ts +12 -0
- package/esbuild.mjs +20 -35
- package/package.json +19 -15
- package/src/app/browser.ts +2 -4
- package/src/app/gjs.ts +28 -8
- package/src/app/index.ts +0 -1
- package/src/app/node.ts +14 -5
- package/src/lib/lib.ts +1 -1
- package/src/plugin.ts +2 -4
- package/src/shims/console-gjs.ts +19 -0
- package/src/types/app.ts +1 -1
- package/src/types/plugin-options.ts +8 -1
- package/src/utils/alias.ts +1 -14
- package/src/utils/extension.ts +1 -1
- package/src/utils/merge.ts +22 -0
- package/src/utils/patch-to-common-js.ts +45 -0
- package/tsconfig.json +17 -7
- package/dist/cjs/index.cjs +0 -11802
- package/dist/types/alias-plugin.d.ts +0 -2
- package/dist/types/app/deno.d.ts +0 -3
- package/src/app/deno.ts +0 -63
- package/src/lodash.d.ts +0 -46
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @gjsify/esbuild-plugin-gjsify
|
|
2
|
+
|
|
3
|
+
Main esbuild plugin for Gjsify. Handles Node.js to GJS module aliasing, CJS-ESM interop patching, and extension transforms.
|
|
4
|
+
|
|
5
|
+
Part of the [gjsify](https://github.com/gjsify/gjsify) project — Node.js and Web APIs for GJS (GNOME JavaScript).
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @gjsify/esbuild-plugin-gjsify
|
|
11
|
+
# or
|
|
12
|
+
yarn add @gjsify/esbuild-plugin-gjsify
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { build } from 'esbuild';
|
|
19
|
+
import { gjsifyPlugin } from '@gjsify/esbuild-plugin-gjsify';
|
|
20
|
+
|
|
21
|
+
await build({
|
|
22
|
+
entryPoints: ['src/index.ts'],
|
|
23
|
+
bundle: true,
|
|
24
|
+
outfile: 'dist/index.js',
|
|
25
|
+
format: 'esm',
|
|
26
|
+
plugins: [gjsifyPlugin()],
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT
|