gameglue 1.2.0 → 1.2.2
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/dist/gg.cjs.js +2 -0
- package/dist/gg.cjs.js.map +1 -0
- package/dist/gg.esm.js +2 -0
- package/dist/gg.esm.js.map +1 -0
- package/dist/gg.sdk.js +1 -1
- package/dist/gg.umd.js +2 -0
- package/dist/gg.umd.js.map +1 -0
- package/package.json +17 -5
- package/rollup.config.js +45 -0
- package/webpack.config.js +6 -0
package/package.json
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gameglue",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Javascript SDK for the GameGlue developer platform.",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/gg.cjs.js",
|
|
7
|
+
"module": "dist/gg.esm.js",
|
|
8
|
+
"browser": "dist/gg.umd.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/gg.esm.js",
|
|
12
|
+
"require": "./dist/gg.cjs.js",
|
|
13
|
+
"browser": "./dist/gg.umd.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
6
16
|
"scripts": {
|
|
7
|
-
"build": "
|
|
17
|
+
"build": "rollup -c",
|
|
8
18
|
"serve": "node examples/server.js",
|
|
9
19
|
"serve:https": "HTTPS=true node examples/server.js",
|
|
10
20
|
"test": "jest",
|
|
@@ -30,11 +40,13 @@
|
|
|
30
40
|
"devDependencies": {
|
|
31
41
|
"@babel/core": "^7.28.5",
|
|
32
42
|
"@babel/preset-env": "^7.28.5",
|
|
43
|
+
"@rollup/plugin-commonjs": "^28.0.0",
|
|
44
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
45
|
+
"@rollup/plugin-terser": "^0.4.0",
|
|
33
46
|
"@types/jest": "^30.0.0",
|
|
34
47
|
"babel-jest": "^30.2.0",
|
|
35
48
|
"jest": "^30.2.0",
|
|
36
49
|
"jest-environment-jsdom": "^30.2.0",
|
|
37
|
-
"
|
|
38
|
-
"webpack-cli": "^5.0.1"
|
|
50
|
+
"rollup": "^4.0.0"
|
|
39
51
|
}
|
|
40
52
|
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import terser from '@rollup/plugin-terser';
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
// ESM build (for modern bundlers like Vite, Rollup)
|
|
7
|
+
{
|
|
8
|
+
input: 'src/index.js',
|
|
9
|
+
output: {
|
|
10
|
+
file: 'dist/gg.esm.js',
|
|
11
|
+
format: 'esm',
|
|
12
|
+
sourcemap: true,
|
|
13
|
+
},
|
|
14
|
+
external: ['socket.io-client', 'oidc-client-ts', 'jwt-decode', 'event-emitter'],
|
|
15
|
+
plugins: [terser()],
|
|
16
|
+
},
|
|
17
|
+
// CommonJS build (for Node.js require())
|
|
18
|
+
{
|
|
19
|
+
input: 'src/index.js',
|
|
20
|
+
output: {
|
|
21
|
+
file: 'dist/gg.cjs.js',
|
|
22
|
+
format: 'cjs',
|
|
23
|
+
sourcemap: true,
|
|
24
|
+
exports: 'named',
|
|
25
|
+
},
|
|
26
|
+
external: ['socket.io-client', 'oidc-client-ts', 'jwt-decode', 'event-emitter'],
|
|
27
|
+
plugins: [terser()],
|
|
28
|
+
},
|
|
29
|
+
// UMD build (for script tags, includes all deps)
|
|
30
|
+
{
|
|
31
|
+
input: 'src/index.js',
|
|
32
|
+
output: {
|
|
33
|
+
file: 'dist/gg.umd.js',
|
|
34
|
+
format: 'umd',
|
|
35
|
+
name: 'GameGlue',
|
|
36
|
+
sourcemap: true,
|
|
37
|
+
globals: {},
|
|
38
|
+
},
|
|
39
|
+
plugins: [
|
|
40
|
+
resolve({ browser: true }),
|
|
41
|
+
commonjs(),
|
|
42
|
+
terser(),
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
];
|