mirror of
https://github.com/appy-one/acebase-client.git
synced 2026-05-24 22:01:18 -06:00
37 lines
983 B
Bash
37 lines
983 B
Bash
#!/bin/bash
|
|
|
|
# Create CommonJS package.json
|
|
cat >dist/cjs/package.json <<JSON
|
|
{
|
|
"type": "commonjs",
|
|
"browser": {
|
|
"socket.io-client": "socket.io-client/dist/socket.io.slim.js",
|
|
"./request/index.js": "./request/browser.js",
|
|
"./performance/index.js": "./performance/browser.js",
|
|
"./base64/index.js": "./base64/browser.js"
|
|
}
|
|
}
|
|
JSON
|
|
|
|
# Write typings to support Node16 module resolution
|
|
cat >dist/cjs/index.d.ts <<TYPESCRIPT
|
|
export * from '../types';
|
|
TYPESCRIPT
|
|
|
|
# Create ESM package.json
|
|
cat >dist/esm/package.json <<JSON
|
|
{
|
|
"type": "module",
|
|
"browser": {
|
|
"socket.io-client": "socket.io-client/dist/socket.io.slim.js",
|
|
"./request/index.js": "./request/browser.js",
|
|
"./performance/index.js": "./performance/browser.js",
|
|
"./base64/index.js": "./base64/browser.js"
|
|
}
|
|
}
|
|
JSON
|
|
|
|
# Write typings to support Node16 module resolution
|
|
cat >dist/esm/index.d.ts <<TYPESCRIPT
|
|
export * from '../types';
|
|
TYPESCRIPT
|