mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-10 06:31:19 +00:00
1. Move marine-related part into FJS repo (DXJ184) 2. Move towards component-oriented architecture (DXJ183) 3. Different JS Client distros for node.js and web (DXJ185)
37 lines
867 B
Bash
Executable File
37 lines
867 B
Bash
Executable File
#!/bin/sh
|
|
|
|
## base64 on MacOS doesn't have -w option
|
|
if echo | base64 -w0 > /dev/null 2>&1;
|
|
then
|
|
BASE64_WEB=$(base64 -w0 ./dist/marine-js.web.js)
|
|
BASE64_NODE=$(base64 -w0 ./dist/marine-js.node.js)
|
|
else
|
|
BASE64_WEB=$(base64 ./dist/marine-js.web.js)
|
|
BASE64_NODE=$(base64 ./dist/marine-js.node.js)
|
|
fi
|
|
|
|
cat << EOF > ./dist/marine-js.b64.web.js
|
|
"use strict";
|
|
// auto-generated
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.default = "$BASE64_WEB";
|
|
EOF
|
|
|
|
cat << EOF > ./dist/marine-js.b64.node.js
|
|
"use strict";
|
|
// auto-generated
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.default = "$BASE64_NODE";
|
|
EOF
|
|
|
|
cat << EOF > ./dist/marine-js.b64.node.d.ts
|
|
declare const _default: string;
|
|
export default _default;
|
|
EOF
|
|
|
|
cat << EOF > ./dist/marine-js.b64.web.d.ts
|
|
declare const _default: string;
|
|
export default _default;
|
|
EOF
|
|
|