Package Exports
- @initia/builder.js
- @initia/builder.js/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@initia/builder.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
initia builder.js
This SDK is a Javascript wrapper for Initia Move Compiler using ffi-napi library.
How to install
$ npm install @initia-labs/builder.jsHow to use
import { MoveBuilder } from '@initia-labs/builder.js';
async function buildExample() {
// recommend to use full package path, not relative path
// ex) path.resolve(__dirname, "../relative_path")
const builder = new MoveBuilder(/* path to move package */, {});
// execute move compiler via ffi
await builder.build();
// load compiled module bytes as `Buffer`
const compiledModuleBytes = await builder.get(/* module name */);
console.info(compiledModuleBytes.toString('hex'));
}