Files
wasm/scripts/pack-wasm-base.js
T
Jaco Greeff da946b18ce Cleanup build, no sed mangling (#129)
* Polyfill require adjust

* Assert in promise for getRandomBytes

* Adjust jest

* Revert explicit overrides (from base)

* use typeof

* Re-add crypto-polyfill (backwards, direct imports)

* crypto log

* Fix dev

* Adjust

* Cleanups, no sed mangling

* Cleanup build folder

* Remove exports

* Cleanups

* Adjust env vs util

* Remove Buffer alloc

* Cleant ext vs int

* Rework naming

* Mapping rename

* Combine index & exports

* withWasm wrapper

* pass{String, U8a} -> alloc{String, U8a}

* Internal reuse

* Explict package-only test
2020-11-02 16:39:54 +01:00

12 lines
350 B
JavaScript
Executable File

// Copyright 2019-2020 @polkadot/wasm authors & contributors
// SPDX-License-Identifier: Apache-2.0
const fs = require('fs');
const buffer = fs.readFileSync('./pkg/wasm_opt.wasm');
fs.writeFileSync('./build/wasm_wasm.js', `// Generated as part of the build, do not edit
module.exports = Buffer.from('${buffer.toString('base64')}', 'base64');
`);