Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/jco/src/cmd/componentize.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,20 @@ export async function componentize(jsSource, opts) {
enableFeatures: opts.enable,
preview2Adapter: opts.preview2Adapter,
debugBuild: opts.debugStarlingmonkeyBuild,
debug: {
bindings: opts.debugBindings,
bindingsDir: opts.debugBindingsDir,
binary: opts.debugBinary,
binaryPath: opts.debugBinaryPath,
enableWizerLogging: opts.debugEnableWizerLogging,
},
});
if (result.debug) {
console.error(
c`{cyan DEBUG} Debug output\n${JSON.stringify(debug, null, 2)}\n`
);
}

component = result.component;
} catch (err) {
// Detect package resolution issues that usually mean a misconfigured "witPath"
Expand Down
17 changes: 17 additions & 0 deletions packages/jco/src/jco.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ program
'use a debug build of StarlingMonkey'
)
.requiredOption('-o, --out <out>', 'output component file')
.option(
'--debug-bindings',
'Output debug bindings and metadata during componentization (by default to stderr)'
)
.option(
'--debug-bindings-dir <dir>',
'Directory to which to output generated bindings and metadata'
)
.option(
'--debug-binary',
'Output binary (without component metadata) created during componentization (by default to tmp dir)'
)
.option(
'--debug-binary-path <path>',
'Path to which to write the generated debug binary'
)
.option('--debug-enable-wizer-logging', 'Enable wizer call debugging')
.action(asyncAction(componentize));

program
Expand Down